Changeset 50277 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_context.c
- Timestamp:
- Jan 29, 2014 8:23:21 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_context.c
r50095 r50277 29 29 30 30 dpyName = ""; 31 if (cr_server.fVisualBitsDefault)32 visualBits = cr_server.fVisualBitsDefault;33 31 34 32 if (shareCtx > 0) { … … 46 44 pContextInfo->currentMural = NULL; 47 45 48 pContextInfo->CreateInfo.visualBits = visualBits; 46 pContextInfo->CreateInfo.requestedVisualBits = visualBits; 47 48 if (cr_server.fVisualBitsDefault) 49 visualBits = cr_server.fVisualBitsDefault; 50 51 pContextInfo->CreateInfo.realVisualBits = visualBits; 49 52 50 53 /* Since the Cr server serialized all incoming clients/contexts into … … 53 56 */ 54 57 if (cr_server.firstCallCreateContext) { 55 cr_server.MainContextInfo.CreateInfo. visualBits = visualBits;58 cr_server.MainContextInfo.CreateInfo.realVisualBits = visualBits; 56 59 cr_server.MainContextInfo.SpuContext = cr_server.head_spu->dispatch_table. 57 CreateContext(dpyName, cr_server.MainContextInfo.CreateInfo. visualBits, shareCtx);60 CreateContext(dpyName, cr_server.MainContextInfo.CreateInfo.realVisualBits, shareCtx); 58 61 if (cr_server.MainContextInfo.SpuContext < 0) { 59 62 crWarning("crServerDispatchCreateContext() failed."); … … 70 73 else { 71 74 /* second or third or ... context */ 72 if (!cr_server.bUseMultipleContexts && ((visualBits & cr_server.MainContextInfo.CreateInfo. visualBits) != visualBits)) {75 if (!cr_server.bUseMultipleContexts && ((visualBits & cr_server.MainContextInfo.CreateInfo.realVisualBits) != visualBits)) { 73 76 int oldSpuContext; 74 77 /* should never be here */ 78 CRASSERT(0); 75 79 /* the new context needs new visual attributes */ 76 cr_server.MainContextInfo.CreateInfo. visualBits |= visualBits;80 cr_server.MainContextInfo.CreateInfo.realVisualBits |= visualBits; 77 81 crWarning("crServerDispatchCreateContext requires new visual (0x%x).", 78 cr_server.MainContextInfo.CreateInfo. visualBits);82 cr_server.MainContextInfo.CreateInfo.realVisualBits); 79 83 80 84 /* Here, we used to just destroy the old rendering context. … … 91 95 oldSpuContext = cr_server.MainContextInfo.SpuContext; 92 96 cr_server.MainContextInfo.SpuContext = cr_server.head_spu->dispatch_table. 93 CreateContext(dpyName, cr_server.MainContextInfo.CreateInfo. visualBits, cr_server.MainContextInfo.SpuContext);97 CreateContext(dpyName, cr_server.MainContextInfo.CreateInfo.realVisualBits, cr_server.MainContextInfo.SpuContext); 94 98 /* destroy old rendering context */ 95 99 cr_server.head_spu->dispatch_table.DestroyContext(oldSpuContext); … … 108 112 if (cr_server.bUseMultipleContexts) { 109 113 pContextInfo->SpuContext = cr_server.head_spu->dispatch_table. 110 CreateContext(dpyName, cr_server.MainContextInfo.CreateInfo. visualBits, cr_server.MainContextInfo.SpuContext);114 CreateContext(dpyName, cr_server.MainContextInfo.CreateInfo.realVisualBits, cr_server.MainContextInfo.SpuContext); 111 115 if (pContextInfo->SpuContext < 0) { 112 116 crWarning("crServerDispatchCreateContext() failed."); … … 136 140 137 141 pContextInfo->pContext = newCtx; 138 pContextInfo->CreateInfo.visualBits = visualBits;142 Assert(pContextInfo->CreateInfo.realVisualBits == visualBits); 139 143 pContextInfo->CreateInfo.externalID = retVal; 140 144 pContextInfo->CreateInfo.pszDpyName = dpyName ? crStrdup(dpyName) : NULL; … … 202 206 if (cr_server.currentCtxInfo == crCtxInfo) 203 207 { 204 CRMuralInfo *dummyMural = crServerGetDummyMural(cr_server.MainContextInfo.CreateInfo. visualBits);208 CRMuralInfo *dummyMural = crServerGetDummyMural(cr_server.MainContextInfo.CreateInfo.realVisualBits); 205 209 crServerPerformMakeCurrent(dummyMural, &cr_server.MainContextInfo); 206 210 CRASSERT(cr_server.currentCtxInfo == &cr_server.MainContextInfo);
Note:
See TracChangeset
for help on using the changeset viewer.