Changeset 57502 in vbox
- Timestamp:
- Aug 23, 2015 5:29:15 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
r57358 r57502 544 544 Log(("vmsvgaPortSetViewPort: screen %d (%d,%d)(%d,%d)\n", uScreenId, x, y, cx, cy)); 545 545 546 pThis->svga.viewport.x = x; 547 pThis->svga.viewport.y = y; 548 pThis->svga.viewport.cx = RT_MIN(cx, (uint32_t)pThis->svga.uWidth); 549 pThis->svga.viewport.cy = RT_MIN(cy, (uint32_t)pThis->svga.uHeight); 550 return; 546 if (x < pThis->svga.uWidth) 547 { 548 pThis->svga.viewport.x = x; 549 pThis->svga.viewport.cx = RT_MIN(cx, pThis->svga.uWidth - x); 550 } 551 else 552 { 553 pThis->svga.viewport.x = pThis->svga.uWidth; 554 pThis->svga.viewport.cx = 0; 555 } 556 if (y < pThis->svga.uHeight) 557 { 558 pThis->svga.viewport.y = y; 559 pThis->svga.viewport.cy = RT_MIN(cy, pThis->svga.uHeight - y); 560 } 561 else 562 { 563 pThis->svga.viewport.y = pThis->svga.uHeight; 564 pThis->svga.viewport.cy = 0; 565 } 551 566 } 552 567 -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
r57358 r57502 2657 2657 || pSurface->pMipmapLevels[0].size.height != pThis->svga.uHeight) 2658 2658 { 2659 float xMultiplier = (float)pSurface->pMipmapLevels[0].size.width / (float)pThis->svga.uWidth;2659 float xMultiplier = (float)pSurface->pMipmapLevels[0].size.width / (float)pThis->svga.uWidth; 2660 2660 float yMultiplier = (float)pSurface->pMipmapLevels[0].size.height / (float)pThis->svga.uHeight; 2661 2661 … … 2941 2941 2942 2942 #endif 2943 #ifndef RT_OS_DARWIN /* darwin: later*/2943 #ifndef RT_OS_DARWIN /* darwin: postponed till after buffer swap. */ 2944 2944 /* Reset the frame buffer association - see below. */ 2945 2945 VMSVGA3D_ASSERT_GL_CALL(pState->ext.glBindFramebuffer(GL_FRAMEBUFFER, pContext->idFramebuffer), pState, pContext); -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r57410 r57502 309 309 /** Maximum height supported. */ 310 310 uint32_t u32MaxHeight; 311 /** Viewport rectangle */ 311 /** Viewport rectangle, i.e. what's currently visible of the target host 312 * window. This is usually (0,0)(uWidth,uHeight), but if the window is 313 * shrunk and scrolling applied, both the origin and size may differ. */ 312 314 struct 313 315 {
Note:
See TracChangeset
for help on using the changeset viewer.