Changeset 34053 in vbox for trunk/src/VBox/GuestHost
- Timestamp:
- Nov 13, 2010 1:52:43 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 67735
- Location:
- trunk/src/VBox/GuestHost/OpenGL
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_glstate.h
r31808 r34053 227 227 228 228 DECLEXPORT(void) STATE_APIENTRY crStateShareContext(GLboolean value); 229 DECLEXPORT(void) STATE_APIENTRY crStateSetSharedContext(CRContext *pCtx); 230 DECLEXPORT(GLboolean) STATE_APIENTRY crStateContextIsShared(CRContext *pCtx); 229 231 #ifdef __cplusplus 230 232 } -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_init.c
r32059 r34053 126 126 } 127 127 } 128 } 129 130 DECLEXPORT(GLboolean) STATE_APIENTRY 131 crStateContextIsShared(CRContext *pCtx) 132 { 133 return pCtx->shared==gSharedState; 134 } 135 136 DECLEXPORT(void) STATE_APIENTRY 137 crStateSetSharedContext(CRContext *pCtx) 138 { 139 if (gSharedState) 140 { 141 crWarning("crStateSetSharedContext: shared is being changed from %p to %p", gSharedState, pCtx->shared); 142 } 143 144 gSharedState = pCtx->shared; 128 145 } 129 146 -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_snapshot.c
r33734 r34053 1021 1021 1022 1022 rc = SSMR3PutS32(pSSM, pContext->shared->id); 1023 AssertRCReturn(rc, rc); 1024 1025 rc = SSMR3PutS32(pSSM, crStateContextIsShared(pContext)); 1026 AssertRCReturn(rc, rc); 1027 1023 1028 if (pContext->shared->refCount>1) 1024 1029 { … … 1361 1366 { 1362 1367 crFindSharedCtxParms_t parms; 1368 int32_t shared; 1363 1369 1364 1370 rc = SSMR3GetS32(pSSM, &pContext->shared->id); 1371 AssertRCReturn(rc, rc); 1372 1373 rc = SSMR3GetS32(pSSM, &shared); 1365 1374 AssertRCReturn(rc, rc); 1366 1375 … … 1372 1381 if (pTmpContext->shared) 1373 1382 { 1374 CRASSERT(pContext->shared->refCount==1 && pTmpContext->shared->refCount>1);1383 CRASSERT(pContext->shared->refCount==1); 1375 1384 bLoadShared = GL_FALSE; 1376 1385 crStateFreeShared(pContext->shared); 1377 1386 pContext->shared = NULL; 1387 pTmpContext->shared->refCount++; 1378 1388 } 1379 1389 else 1380 1390 { 1381 1391 SLC_COPYPTR(shared); 1392 } 1393 1394 if (bLoadShared && shared) 1395 { 1396 crStateSetSharedContext(pTmpContext); 1382 1397 } 1383 1398 }
Note:
See TracChangeset
for help on using the changeset viewer.