Changeset 44913 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/render
- Timestamp:
- Mar 4, 2013 5:24:56 PM (12 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/render
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c
r44908 r44913 507 507 /* ensure no concurrent draws can take place */ 508 508 renderspuVBoxCompositorSet(window, NULL); 509 renderspuVBoxPresentBlitterCleanup(window); 509 510 renderspu_SystemDestroyWindow( window ); 510 511 RTCritSectDelete(&window->CompositorLock); … … 693 694 } 694 695 } 696 } 697 698 void renderspuVBoxPresentBlitterCleanup( WindowInfo *window ) 699 { 700 if (!window->pBlitter) 701 return; 702 703 if (render_spu.blitterTable) 704 { 705 CR_BLITTER_WINDOW * pBltInfo = CrBltMuralGetCurrent(window->pBlitter); 706 if (pBltInfo == &window->BltInfo) 707 { 708 CrBltMuralSetCurrent(window->pBlitter, NULL); 709 } 710 } 711 else 712 { 713 CRASSERT(CrBltMuralGetCurrent(window->pBlitter) == &window->BltInfo); 714 CrBltMuralSetCurrent(window->pBlitter, NULL); 715 CrBltTerm(window->pBlitter); 716 } 717 window->pBlitter = NULL; 695 718 } 696 719 -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.h
r44908 r44913 400 400 extern void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, struct VBOXVR_SCR_COMPOSITOR * pCompositor, struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry ); 401 401 extern PCR_BLITTER renderspuVBoxPresentBlitterGet( WindowInfo *window ); 402 void renderspuVBoxPresentBlitterCleanup( WindowInfo *window ); 402 403 extern int renderspuVBoxPresentBlitterEnter( PCR_BLITTER pBlitter ); 403 404 extern PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window ); -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_init.c
r44908 r44913 195 195 render_spu.windowTable = crAllocHashtableEx(1, INT32_MAX); 196 196 197 pcpwSetting = crGetenv("CR_RENDER_ENABLE_ PRESENT_CONTEXT_PER_WINDOW");197 pcpwSetting = crGetenv("CR_RENDER_ENABLE_SINGLE_PRESENT_CONTEXT"); 198 198 if (pcpwSetting) 199 199 { … … 201 201 pcpwSetting = NULL; 202 202 } 203 else204 {205 /* default is enable for OSX */206 #if 0 //defined(DARWIN) && defined(VBOX_WITH_COCOA_QT)207 pcpwSetting = (char*)1;208 #endif209 210 }211 212 203 213 204 if (pcpwSetting) 214 205 { 206 /* TODO: need proper blitter synchronization, do not use so far! 207 * the problem is that rendering can be done in multiple thread: the main command (hgcm) thread and the redraw thread 208 * we currently use per-window synchronization, while we'll need a per-blitter synchronization if one blitter is used for multiple windows 209 * this is not done currently */ 210 crWarning("TODO: need proper blitter synchronization, do not use so far!"); 215 211 render_spu.blitterTable = crAllocHashtable(); 216 212 CRASSERT(render_spu.blitterTable); … … 428 424 } 429 425 426 static void renderspuBlitterCleanupCB(unsigned long key, void *data1, void *data2) 427 { 428 WindowInfo *window = (WindowInfo *) data1; 429 CRASSERT(window); 430 431 renderspuVBoxPresentBlitterCleanup( window ); 432 } 433 430 434 static int renderSPUCleanup(void) 431 435 { 432 436 renderspuVBoxCompositorClearAll(); 437 438 if (render_spu.blitterTable) 439 { 440 crFreeHashtable(render_spu.blitterTable, DeleteBlitterCallback); 441 render_spu.blitterTable = NULL; 442 } 443 else 444 { 445 crHashtableWalk(render_spu.windowTable, renderspuBlitterCleanupCB, NULL); 446 } 447 433 448 crFreeHashtable(render_spu.contextTable, DeleteContextCallback); 434 449 render_spu.contextTable = NULL; … … 437 452 crFreeHashtable(render_spu.barrierHash, crFree); 438 453 render_spu.barrierHash = NULL; 439 440 if (render_spu.blitterTable)441 crFreeHashtable(render_spu.blitterTable, DeleteBlitterCallback);442 454 443 455 #ifdef RT_OS_DARWIN … … 527 539 } 528 540 541 #ifdef RT_OS_DARWIN 529 542 static void renderspuWindowVisibleRegionCB(unsigned long key, void *data1, void *data2) 530 543 { … … 534 547 renderspu_SystemWindowApplyVisibleRegion(window); 535 548 } 549 #endif 536 550 537 551 DECLEXPORT(void) renderspuSetRootVisibleRegion(GLint cRects, GLint *pRects)
Note:
See TracChangeset
for help on using the changeset viewer.