Changeset 44886 in vbox for trunk/src/VBox/HostServices/SharedOpenGL
- Timestamp:
- Mar 1, 2013 2:11:35 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84054
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c
r44766 r44886 279 279 else 280 280 { 281 if (redir == CR_SERVER_REDIR_NONE) 282 { 283 /* tell renderspu we do not want compositor presentation anymore 284 * renderspu will ensure its redraw thread is done with using the compositor, etc. */ 285 cr_server.head_spu->dispatch_table.VBoxPresentComposition(mural->spuWindow, NULL, NULL); 286 } 287 281 288 if (mural->fUseFBO == CR_SERVER_REDIR_FBO_RAM) 282 289 cr_server.head_spu->dispatch_table.WindowShow(mural->spuWindow, mural->bVisible); -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
r44860 r44886 326 326 Tex.target = GL_TEXTURE_2D; 327 327 Tex.hwid = 0; 328 CrVrScrCompositorLock(&mural->Compositor); 328 329 if (mural->fUseFBO != CR_SERVER_REDIR_NONE) 330 { 331 /* since we're going to change the current compositor & the window we need to avoid 332 * renderspu fron dealing with inconsistent data, i.e. modified compositor and 333 * still unmodified window. 334 * So what we do is: 335 * 1. tell renderspu to stop using the current compositor -> renderspu would do necessary synchronization with its redraw thread to ensure compositor is no longer used 336 * 2. do necessary modifications 337 * 3. (so far not needed for resize, but in case it is in the future) re-set the compositor */ 338 339 /* 1. tell renderspu to stop using the current compositor (see above comment) */ 340 cr_server.head_spu->dispatch_table.VBoxPresentComposition(mural->spuWindow, NULL, NULL); 341 } 342 343 /* 2. do necessary modifications (see above comment) */ 344 /* NOTE: we can do it even if mural->fUseFBO == CR_SERVER_REDIR_NONE to make sure the compositor data is always up to date */ 345 /* the compositor lock is not needed actually since we have prevented renderspu from using the compositor */ 346 /* CrVrScrCompositorLock(&mural->Compositor); */ 329 347 CrVrScrCompositorEntryRemove(&mural->Compositor, &mural->CEntry); 330 CrVrScrCompositorUnlock(&mural->Compositor);331 348 CrVrScrCompositorEntryInit(&mural->CEntry, &Tex); 349 /* CrVrScrCompositorUnlock(&mural->Compositor); */ 332 350 mural->width = width; 333 351 mural->height = height; 334 } 335 336 if (cr_server.curClient && cr_server.curClient->currentMural == mural) 337 { 338 crStateGetCurrent()->buffer.width = mural->width; 339 crStateGetCurrent()->buffer.height = mural->height; 340 } 341 342 crServerCheckMuralGeometry(mural); 343 344 cr_server.head_spu->dispatch_table.WindowSize(mural->spuWindow, width, height); 352 353 if (cr_server.curClient && cr_server.curClient->currentMural == mural) 354 { 355 crStateGetCurrent()->buffer.width = mural->width; 356 crStateGetCurrent()->buffer.height = mural->height; 357 } 358 359 crServerCheckMuralGeometry(mural); 360 361 cr_server.head_spu->dispatch_table.WindowSize(mural->spuWindow, width, height); 362 363 /* 3. (so far not needed for resize, but in case it is in the future) re-set the compositor (see above comment) */ 364 /* 365 if (mural->fUseFBO != CR_SERVER_REDIR_NONE) 366 { 367 cr_server.head_spu->dispatch_table.VBoxPresentComposition(mural->spuWindow, &mural->Compositor, &mural->CEntry); 368 } 369 */ 370 } 345 371 } 346 372 … … 386 412 return; 387 413 } 388 mural->gX = x; 389 mural->gY = y; 390 391 Pos.x = x; 392 Pos.y = y; 393 394 CrVrScrCompositorLock(&mural->Compositor); 395 CrVrScrCompositorEntryPosSet(&mural->Compositor, &mural->CEntry, &Pos); 396 CrVrScrCompositorUnlock(&mural->Compositor); 397 398 crServerCheckMuralGeometry(mural); 414 if (mural->gX != x || mural->gY != y) 415 { 416 if (mural->fUseFBO != CR_SERVER_REDIR_NONE) 417 { 418 /* since we're going to change the current compositor & the window we need to avoid 419 * renderspu fron dealing with inconsistent data, i.e. modified compositor and 420 * still unmodified window. 421 * So what we do is: 422 * 1. tell renderspu to stop using the current compositor -> renderspu would do necessary synchronization with its redraw thread to ensure compositor is no longer used 423 * 2. do necessary modifications 424 * 3. re-set the compositor */ 425 426 /* 1. tell renderspu to stop using the current compositor (see above comment) */ 427 cr_server.head_spu->dispatch_table.VBoxPresentComposition(mural->spuWindow, NULL, NULL); 428 } 429 430 /* 2. do necessary modifications (see above comment) */ 431 /* NOTE: we can do it even if mural->fUseFBO == CR_SERVER_REDIR_NONE to make sure the compositor data is always up to date */ 432 Pos.x = x; 433 Pos.y = y; 434 435 /* the compositor lock is not needed actually since we have prevented renderspu from using the compositor */ 436 /* CrVrScrCompositorLock(&mural->Compositor); */ 437 CrVrScrCompositorEntryPosSet(&mural->Compositor, &mural->CEntry, &Pos); 438 /*CrVrScrCompositorUnlock(&mural->Compositor);*/ 439 440 mural->gX = x; 441 mural->gY = y; 442 443 crServerCheckMuralGeometry(mural); 444 445 /* 3. re-set the compositor (see above comment) */ 446 if (mural->fUseFBO != CR_SERVER_REDIR_NONE) 447 { 448 cr_server.head_spu->dispatch_table.VBoxPresentComposition(mural->spuWindow, &mural->Compositor, &mural->CEntry); 449 } 450 } 399 451 } 400 452 … … 410 462 } 411 463 464 if (mural->fUseFBO != CR_SERVER_REDIR_NONE) 465 { 466 /* since we're going to change the current compositor & the window we need to avoid 467 * renderspu fron dealing with inconsistent data, i.e. modified compositor and 468 * still unmodified window. 469 * So what we do is: 470 * 1. tell renderspu to stop using the current compositor -> renderspu would do necessary synchronization with its redraw thread to ensure compositor is no longer used 471 * 2. do necessary modifications 472 * 3. re-set the compositor */ 473 474 /* 1. tell renderspu to stop using the current compositor (see above comment) */ 475 cr_server.head_spu->dispatch_table.VBoxPresentComposition(mural->spuWindow, NULL, NULL); 476 } 477 478 /* 2. do necessary modifications (see above comment) */ 479 /* NOTE: we can do it even if mural->fUseFBO = CR_SERVER_REDIR_NONE to make sure the compositor data is always up to date */ 480 /* the compositor lock is not needed actually since we have prevented renderspu from using the compositor */ 481 /* CrVrScrCompositorLock(&mural->Compositor); */ 482 CrVrScrCompositorEntryRegionsSet(&mural->Compositor, &mural->CEntry, NULL, cRects, (const RTRECT *)pRects); 483 /*CrVrScrCompositorUnlock(&mural->Compositor);*/ 484 412 485 if (mural->pVisibleRects) 413 486 { … … 437 510 } 438 511 439 CrVrScrCompositorLock(&mural->Compositor); 440 CrVrScrCompositorEntryRegionsSet(&mural->Compositor, &mural->CEntry, NULL, cRects, (const RTRECT *)pRects); 441 CrVrScrCompositorUnlock(&mural->Compositor); 512 /* 3. re-set the compositor (see above comment) */ 513 if (mural->fUseFBO != CR_SERVER_REDIR_NONE) 514 { 515 cr_server.head_spu->dispatch_table.VBoxPresentComposition(mural->spuWindow, &mural->Compositor, &mural->CEntry); 516 } 442 517 } 443 518 -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c
r44880 r44886 589 589 if (window) { 590 590 renderspuVBoxCompositorSet( window, pCompositor); 591 /* renderspuVBoxPresentComposition can be invoked from the chromium thread only and is not reentrant, 592 * no need to acquire a compositor lock here */ 593 renderspu_SystemVBoxPresentComposition(window, pCompositor, pChangedEntry); 591 if (pCompositor) 592 { 593 renderspu_SystemVBoxPresentComposition(window, pCompositor, pChangedEntry); 594 } 594 595 } 595 596 else {
Note:
See TracChangeset
for help on using the changeset viewer.