Changeset 16718 in vbox
- Timestamp:
- Feb 12, 2009 7:01:48 PM (16 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL/context.c
r16640 r16718 139 139 winInfo->drawable = (GLXDrawable) spuWin; 140 140 winInfo->pVisibleRegions = NULL; 141 winInfo->cVisibleRegions = 0; 141 142 #endif 142 143 winInfo->spuWindow = spuWin; … … 277 278 #ifdef GLX 278 279 context->pGLXPixmapsHash = crAllocHashtable(); 280 context->damageInitFailed = GL_FALSE; 281 context->damageDpy = NULL; 282 context->damageEventsBase = 0; 279 283 #endif 280 284 … … 1008 1012 #ifdef GLX 1009 1013 crFreeHashtable(context->pGLXPixmapsHash, crFree); 1014 if (context->damageDpy) 1015 { 1016 XCloseDisplay(context->damageDpy); 1017 } 1010 1018 #endif 1011 1019 -
trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL/load.c
r16640 r16718 74 74 static ClearFunc_t origClear; 75 75 static ViewportFunc_t origViewport; 76 static SwapBuffersFunc_t origSwapBuffers; 77 static DrawBufferFunc_t origDrawBuffer; 76 78 77 79 static void stubCheckWindowState(void) … … 152 154 } 153 155 156 static void SPU_APIENTRY trapSwapBuffers(GLint window, GLint flags) 157 { 158 stubCheckWindowState(); 159 origSwapBuffers(window, flags); 160 } 161 162 static void SPU_APIENTRY trapDrawBuffer(GLenum buf) 163 { 164 stubCheckWindowState(); 165 origDrawBuffer(buf); 166 } 154 167 155 168 /** … … 166 179 origClear = stub.spuDispatch.Clear; 167 180 origViewport = stub.spuDispatch.Viewport; 181 origSwapBuffers = stub.spuDispatch.SwapBuffers; 182 origDrawBuffer = stub.spuDispatch.DrawBuffer; 168 183 stub.spuDispatch.Clear = trapClear; 169 184 stub.spuDispatch.Viewport = trapViewport; 185 /*stub.spuDispatch.SwapBuffers = trapSwapBuffers; 186 stub.spuDispatch.DrawBuffer = trapDrawBuffer;*/ 170 187 } 171 188 … … 297 314 #elif defined(GLX) 298 315 defaultWin->pVisibleRegions = NULL; 316 defaultWin->cVisibleRegions = 0; 299 317 #endif 300 318 crHashtableAdd(stub.windowTable, 0, defaultWin); -
trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL/stub.c
r16480 r16718 451 451 XFixesDestroyRegion(pWindow->dpy, xreg); 452 452 453 if (!pWindow->pVisibleRegions 453 /* @todo For some odd reason *first* run of compiz on freshly booted VM gives us 0 cRects all the time. 454 * In (!pWindow->pVisibleRegions && cRects) "&& cRects" is a workaround for that case, especially as this 455 * information is useless for full screen composing managers anyway. 456 */ 457 if ((!pWindow->pVisibleRegions && cRects) 454 458 || pWindow->cVisibleRegions!=cRects 455 459 || crMemcmp(pWindow->pVisibleRegions, pXRects, cRects * sizeof(XRectangle))) … … 465 469 } 466 470 467 / *crDebug("Got %i rects.", cRects);*/471 //crDebug("Got %i rects.", cRects); 468 472 for (i=0; i<cRects; ++i) 469 473 { … … 472 476 pGLRects[4*i+2] = pXRects[i].x+pXRects[i].width; 473 477 pGLRects[4*i+3] = pXRects[i].y+pXRects[i].height; 474 / *crDebug("Rect[%i]=(%i,%i,%i,%i)", i, pGLRects[4*i+0], pGLRects[4*i+1], pGLRects[4*i+2], pGLRects[4*i+3]);*/478 //crDebug("Rect[%i]=(%i,%i,%i,%i)", i, pGLRects[4*i+0], pGLRects[4*i+1], pGLRects[4*i+2], pGLRects[4*i+3]); 475 479 } 476 480 -
trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL/stub.h
r16640 r16718 43 43 #include <X11/extensions/XShm.h> 44 44 #include <sys/shm.h> 45 #include <X11/extensions/Xdamage.h> 45 46 #endif 46 47 … … 74 75 Window root; 75 76 GC gc; 76 Pixmap pixmap; 77 void *data; 77 Pixmap pixmap; /* Shared memory pixmap object, if it's supported*/ 78 Damage damage; 79 Bool bPixmapImageDirty; 78 80 }; 79 81 #endif … … 111 113 GLXContext glxContext; 112 114 CRHashTable *pGLXPixmapsHash; 115 Bool damageInitFailed; 116 Display *damageDpy; /* second display connection to read xdamage extension data */ 117 int damageEventsBase; 113 118 #endif 114 119 };
Note:
See TracChangeset
for help on using the changeset viewer.