Changeset 78341 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/render
- Timestamp:
- Apr 28, 2019 4:47:51 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 130318
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/render
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c
r78263 r78341 466 466 if (window && context) 467 467 { 468 #ifdef CHROMIUM_THREADSAFE469 468 crSetTSD(&_RenderTSD, context); 470 #else471 render_spu.currentContext = context;472 #endif473 469 context->currentWindow = window; 474 470 … … 509 505 { 510 506 renderspu_SystemMakeCurrent( NULL, 0, NULL ); 511 #ifdef CHROMIUM_THREADSAFE512 507 crSetTSD(&_RenderTSD, NULL); 513 #else514 render_spu.currentContext = NULL;515 #endif516 508 } 517 509 else -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.h
r78263 r78341 232 232 ContextInfo *defaultSharedContext; 233 233 234 #ifndef CHROMIUM_THREADSAFE235 ContextInfo *currentContext;236 #endif237 238 234 crOpenGLInterface ws; /**< Window System interface */ 239 235 … … 306 302 extern uint64_t render_spu_parent_window_id; 307 303 308 #ifdef CHROMIUM_THREADSAFE309 304 extern CRtsd _RenderTSD; 310 305 #define GET_CONTEXT_VAL() ((ContextInfo *) crGetTSD(&_RenderTSD)) … … 312 307 crSetTSD(&_RenderTSD, (_v)); \ 313 308 } while (0) 314 #else315 #define GET_CONTEXT_VAL() (render_spu.currentContext)316 #define SET_CONTEXT_VAL(_v) do { \317 render_spu.currentContext = (_v); \318 } while (0)319 320 #endif321 309 322 310 #define GET_CONTEXT(T) ContextInfo *T = GET_CONTEXT_VAL() -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_glx.c
r78251 r78341 1572 1572 if (window->BltInfo.width != w || window->BltInfo.height != h) { 1573 1573 /* Only resize if the new dimensions really are different */ 1574 #ifdef CHROMIUM_THREADSAFE1575 1574 ContextInfo *currentContext = (ContextInfo *) crGetTSD(&_RenderTSD); 1576 #else1577 ContextInfo *currentContext = render_spu.currentContext;1578 #endif1579 1575 /* Can't resize pbuffers, so destroy it and make a new one */ 1580 1576 render_spu.ws.glXDestroyPbuffer(window->visual->dpy, window->window); -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_init.c
r78263 r78341 28 28 RenderSPU render_spu; 29 29 uint64_t render_spu_parent_window_id = 0; 30 31 #ifdef CHROMIUM_THREADSAFE32 30 CRtsd _RenderTSD; 33 #endif34 31 35 32 #ifdef RT_OS_WINDOWS … … 151 148 self->privatePtr = (void *) &render_spu; 152 149 153 #ifdef CHROMIUM_THREADSAFE154 150 crDebug("Render SPU: thread-safe"); 155 151 crInitTSD(&_RenderTSD); 156 #endif157 152 158 153 crMemZero(&render_spu, sizeof(render_spu)); … … 498 493 crUnloadOpenGL(); 499 494 500 #ifdef CHROMIUM_THREADSAFE501 495 crFreeTSD(&_RenderTSD); 502 #endif503 504 496 return 1; 505 497 }
Note:
See TracChangeset
for help on using the changeset viewer.