Changeset 35998 in vbox for trunk/src/VBox
- Timestamp:
- Feb 16, 2011 2:24:09 PM (14 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h
r35969 r35998 26 26 #endif 27 27 28 #define SHCROGL_SSM_VERSION 2 428 #define SHCROGL_SSM_VERSION 25 29 29 30 30 #define CR_MAX_WINDOWS 100 … … 64 64 GLboolean bUseFBO; /*redirect to FBO instead of real host window*/ 65 65 66 GLint cVisibleRects; /*count of visible rects*/ 67 GLint *pVisibleRects; /*visible rects left, top, right, bottom*/ 66 GLint cVisibleRects; /*count of visible rects*/ 67 GLint *pVisibleRects; /*visible rects left, top, right, bottom*/ 68 GLboolean bReceivedRects; /*indicates if guest did any updates for visible regions*/ 68 69 69 70 GLuint idFBO, idColorTex, idDepthStencilRB; -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c
r35995 r35998 340 340 crServerTransformRect(&rectwr, &rect, -mural->gX, -mural->gY); 341 341 342 #if 0 /*@todo recheck with compiz on guests, as we could sometimes have main compiz windows without visible rects*/343 342 if (!mural->pVisibleRects) 344 343 { 345 tmppixels = crAlloc(4*(rect.x2-rect.x1)*(rect.y2-rect.y1));346 if (! tmppixels)344 /*we don't get any rects info for guest compiz windows, so we treat windows as visible unless explicitly received 0 visible rects*/ 345 if (!mural->bReceivedRects) 347 346 { 348 crWarning("Out of memory in crServerPresentFBO"); 349 crFree(pixels); 350 return; 351 } 352 353 crServerCopySubImage(tmppixels, pixels, &rectwr, mural->fboWidth, mural->fboHeight); 354 /*Note: pfnPresentFBO would free tmppixels*/ 355 cr_server.pfnPresentFBO(tmppixels, i, rect.x1-cr_server.screen[i].x, rect.y1-cr_server.screen[i].y, rect.x2-rect.x1, rect.y2-rect.y1); 356 } 357 #endif 358 for (j=0; j<mural->cVisibleRects; ++j) 359 { 360 if (crServerIntersectRect(&rectwr, (CRrecti*) &mural->pVisibleRects[4*j], §r)) 361 { 362 tmppixels = crAlloc(4*(sectr.x2-sectr.x1)*(sectr.y2-sectr.y1)); 347 tmppixels = crAlloc(4*(rect.x2-rect.x1)*(rect.y2-rect.y1)); 363 348 if (!tmppixels) 364 349 { … … 368 353 } 369 354 370 crServerCopySubImage(tmppixels, pixels, & sectr, mural->fboWidth, mural->fboHeight);355 crServerCopySubImage(tmppixels, pixels, &rectwr, mural->fboWidth, mural->fboHeight); 371 356 /*Note: pfnPresentFBO would free tmppixels*/ 372 cr_server.pfnPresentFBO(tmppixels, i, 373 sectr.x1+mural->gX-cr_server.screen[i].x, 374 sectr.y1+mural->gY-cr_server.screen[i].y, 375 sectr.x2-sectr.x1, sectr.y2-sectr.y1); 357 cr_server.pfnPresentFBO(tmppixels, i, rect.x1-cr_server.screen[i].x, rect.y1-cr_server.screen[i].y, rect.x2-rect.x1, rect.y2-rect.y1); 358 } 359 } 360 else 361 { 362 for (j=0; j<mural->cVisibleRects; ++j) 363 { 364 if (crServerIntersectRect(&rectwr, (CRrecti*) &mural->pVisibleRects[4*j], §r)) 365 { 366 tmppixels = crAlloc(4*(sectr.x2-sectr.x1)*(sectr.y2-sectr.y1)); 367 if (!tmppixels) 368 { 369 crWarning("Out of memory in crServerPresentFBO"); 370 crFree(pixels); 371 return; 372 } 373 374 crServerCopySubImage(tmppixels, pixels, §r, mural->fboWidth, mural->fboHeight); 375 /*Note: pfnPresentFBO would free tmppixels*/ 376 cr_server.pfnPresentFBO(tmppixels, i, 377 sectr.x1+mural->gX-cr_server.screen[i].x, 378 sectr.y1+mural->gY-cr_server.screen[i].y, 379 sectr.x2-sectr.x1, sectr.y2-sectr.y1); 380 } 376 381 } 377 382 } -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
r33988 r35998 86 86 mural->cVisibleRects = 0; 87 87 mural->pVisibleRects = NULL; 88 mural->bReceivedRects = GL_FALSE; 88 89 89 90 /* generate ID for this new window/mural (special-case for file conns) */ … … 282 283 283 284 mural->cVisibleRects = cRects; 285 mural->bReceivedRects = GL_TRUE; 284 286 if (cRects) 285 287 {
Note:
See TracChangeset
for help on using the changeset viewer.