Changeset 23840 in vbox for trunk/src/VBox/HostServices/SharedOpenGL
- Timestamp:
- Oct 17, 2009 2:51:40 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 53598
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
r21576 r23840 119 119 } 120 120 121 void crServerCheckCurrentCtxWindowCB(unsigned long key, void *data1, void *data2)122 {123 CRContext *crCtx = (CRContext *) data1;124 GLint window = *(GLint*)data2;125 126 (void) key;127 }128 129 121 void SERVER_DISPATCH_APIENTRY 130 122 crServerDispatchWindowDestroy( GLint window ) … … 194 186 } 195 187 196 crHashtableWalk(cr_server.contextTable, crServerCheckCurrentCtxWindowCB, &window);197 188 crHashtableDelete(cr_server.pWindowCreateInfoTable, window, crServerCreateInfoDeleteCB); 198 189 crHashtableDelete(cr_server.muralTable, window, crFree); 199 190 } 200 201 191 202 192 void SERVER_DISPATCH_APIENTRY -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c
r22509 r23840 338 338 } 339 339 340 static void renderspuCheckCurrentCtxWindowCB(unsigned long key, void *data1, void *data2) 341 { 342 ContextInfo *pCtx = (ContextInfo *) data1; 343 WindowInfo *pWindow = data2; 344 (void) key; 345 346 if (pCtx->currentWindow==pWindow) 347 { 348 renderspuMakeCurrent(0, 0, pCtx->id); 349 } 350 } 340 351 341 352 static void … … 343 354 { 344 355 WindowInfo *window; 356 GET_CONTEXT(pOldCtx); 357 345 358 CRASSERT(win >= 0); 346 359 window = (WindowInfo *) crHashtableSearch(render_spu.windowTable, win); … … 350 363 /* remove window info from hash table, and free it */ 351 364 crHashtableDelete(render_spu.windowTable, win, crFree); 365 366 /* check if this window is bound to some ctx. Note: window pointer is already freed here */ 367 crHashtableWalk(render_spu.contextTable, renderspuCheckCurrentCtxWindowCB, window); 368 369 /* restore current context */ 370 { 371 GET_CONTEXT(pNewCtx); 372 if (pNewCtx!=pOldCtx) 373 { 374 renderspuMakeCurrent(pOldCtx&&pOldCtx->currentWindow ? pOldCtx->currentWindow->id:0, 0, 375 pOldCtx ? pOldCtx->id:0); 376 } 377 } 352 378 } 353 379 else {
Note:
See TracChangeset
for help on using the changeset viewer.