- Timestamp:
- Dec 15, 2011 4:09:12 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 75426
- Location:
- trunk/src/VBox/Additions/common/crOpenGL
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/context.c
r39602 r39631 346 346 static DECLCALLBACK(void) stubContextDtor(void*pvContext) 347 347 { 348 crHashtableLock(stub.windowTable); 348 349 crHashtableLock(stub.contextTable); 349 350 stubDestroyContextLocked((ContextInfo*)pvContext); 350 351 crHashtableUnlock(stub.contextTable); 352 crHashtableUnlock(stub.windowTable); 351 353 } 352 354 #endif … … 1181 1183 } 1182 1184 1185 /* the lock order is windowTable->contextTable (see wglMakeCurrent_prox, glXMakeCurrent) 1186 * this is why we need to take a windowTable lock since we will later do stub.windowTable access & locking */ 1187 crHashtableLock(stub.windowTable); 1183 1188 crHashtableLock(stub.contextTable); 1184 1189 … … 1201 1206 #endif 1202 1207 crHashtableUnlock(stub.contextTable); 1208 crHashtableUnlock(stub.windowTable); 1203 1209 } 1204 1210 -
trunk/src/VBox/Additions/common/crOpenGL/load.c
r39602 r39631 340 340 //delete all created contexts 341 341 stubMakeCurrent( NULL, NULL); 342 343 /* the lock order is windowTable->contextTable (see wglMakeCurrent_prox, glXMakeCurrent) 344 * this is why we need to take a windowTable lock since we will later do stub.windowTable access & locking */ 345 crHashtableLock(stub.windowTable); 342 346 crHashtableWalk(stub.contextTable, hsWalkStubDestroyContexts, NULL); 347 crHashtableUnlock(stub.windowTable); 343 348 344 349 /* shutdown, now trap any calls to a NULL dispatcher */ -
trunk/src/VBox/Additions/common/crOpenGL/stub.c
r39568 r39631 125 125 } 126 126 127 static void stubWindowCleanupForContextsCB(unsigned long key, void *data1, void *data2) 128 { 129 ContextInfo *context = (ContextInfo *) data1; 130 131 CRASSERT(context); 132 133 if (context->currentDrawable == data2) 134 context->currentDrawable = NULL; 135 } 136 127 137 void APIENTRY crWindowDestroy( GLint window ) 128 138 { … … 153 163 #endif 154 164 crForcedFlush(); 165 166 crHashtableWalk(stub.contextTable, stubWindowCleanupForContextsCB, winInfo); 167 155 168 crHashtableDelete(stub.windowTable, window, crFree); 156 169
Note:
See TracChangeset
for help on using the changeset viewer.