Changeset 35148 in vbox
- Timestamp:
- Dec 15, 2010 4:32:14 PM (14 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/DisplayImpl.cpp
r35047 r35148 617 617 */ 618 618 int Display::handleDisplayResize (unsigned uScreenId, uint32_t bpp, void *pvVRAM, 619 uint32_t cbLine, int w, int h )619 uint32_t cbLine, int w, int h, uint16_t flags) 620 620 { 621 621 LogRel (("Display::handleDisplayResize(): uScreenId = %d, pvVRAM=%p " 622 "w=%d h=%d bpp=%d cbLine=0x%X \n",623 uScreenId, pvVRAM, w, h, bpp, cbLine ));622 "w=%d h=%d bpp=%d cbLine=0x%X, flags=0x%X\n", 623 uScreenId, pvVRAM, w, h, bpp, cbLine, flags)); 624 624 625 625 /* If there is no framebuffer, this call is not interesting. */ … … 635 635 mLastWidth = w; 636 636 mLastHeight = h; 637 mLastFlags = flags; 637 638 638 639 ULONG pixelFormat; … … 675 676 maFramebuffers[uScreenId].pendingResize.w = w; 676 677 maFramebuffers[uScreenId].pendingResize.h = h; 678 maFramebuffers[uScreenId].pendingResize.flags = flags; 677 679 678 680 return VINF_VGA_RESIZE_IN_PROGRESS; … … 739 741 pFBInfo->pendingResize.fPending = false; 740 742 handleDisplayResize (uScreenId, pFBInfo->pendingResize.bpp, pFBInfo->pendingResize.pvVRAM, 741 pFBInfo->pendingResize.cbLine, pFBInfo->pendingResize.w, pFBInfo->pendingResize.h );743 pFBInfo->pendingResize.cbLine, pFBInfo->pendingResize.w, pFBInfo->pendingResize.h, pFBInfo->pendingResize.flags); 742 744 continue; 743 745 } … … 946 948 if (!mpDrv) 947 949 return; 948 x2 = mpDrv->IConnector.cx + maFramebuffers[0].xOrigin; 949 y2 = mpDrv->IConnector.cy + maFramebuffers[0].yOrigin; 950 /* If VBVA is not in use then maFramebuffers will be zeroed out and this 951 * will still work as it should. */ 952 if (!(maFramebuffers[0].flags & VBVA_SCREEN_F_DISABLED)) 953 { 954 x2 = mpDrv->IConnector.cx + (int32_t)maFramebuffers[0].xOrigin; 955 y2 = mpDrv->IConnector.cy + (int32_t)maFramebuffers[0].yOrigin; 956 } 950 957 for (unsigned i = 1; i < mcMonitors; ++i) 951 958 { 952 x1 = RT_MIN(x1, maFramebuffers[i].xOrigin); 953 y1 = RT_MIN(y1, maFramebuffers[i].yOrigin); 954 x2 = RT_MAX(x2, maFramebuffers[i].xOrigin + (int32_t)maFramebuffers[i].w); 955 y2 = RT_MAX(y2, maFramebuffers[i].yOrigin + (int32_t)maFramebuffers[i].h); 959 if (!(maFramebuffers[i].flags & VBVA_SCREEN_F_DISABLED)) 960 { 961 x1 = RT_MIN(x1, maFramebuffers[i].xOrigin); 962 y1 = RT_MIN(y1, maFramebuffers[i].yOrigin); 963 x2 = RT_MAX(x2, maFramebuffers[i].xOrigin 964 + (int32_t)maFramebuffers[i].w); 965 y2 = RT_MAX(y2, maFramebuffers[i].yOrigin 966 + (int32_t)maFramebuffers[i].h); 967 } 956 968 } 957 969 *px1 = x1; … … 2992 3004 pFBInfo->u32LineSize, 2993 3005 pFBInfo->w, 2994 pFBInfo->h); 3006 pFBInfo->h, 3007 pFBInfo->flags); 2995 3008 } 2996 3009 else if (uScreenId == VBOX_VIDEO_PRIMARY_SCREEN) … … 3001 3014 that->mLastBytesPerLine, 3002 3015 that->mLastWidth, 3003 that->mLastHeight); 3016 that->mLastHeight, 3017 that->mLastFlags); 3004 3018 } 3005 3019 } … … 3022 3036 bpp, pvVRAM, cbLine, cx, cy)); 3023 3037 3024 return pDrv->pDisplay->handleDisplayResize(VBOX_VIDEO_PRIMARY_SCREEN, bpp, pvVRAM, cbLine, cx, cy );3038 return pDrv->pDisplay->handleDisplayResize(VBOX_VIDEO_PRIMARY_SCREEN, bpp, pvVRAM, cbLine, cx, cy, VBVA_SCREEN_F_ACTIVE); 3025 3039 } 3026 3040 … … 3434 3448 { 3435 3449 /* Primary screen resize is initiated by the VGA device. */ 3436 pDrv->pDisplay->handleDisplayResize(uScreenId, pScreen->bitsPerPixel, (uint8_t *)pvVRAM + pFBInfo->u32Offset, pScreen->u32LineSize, pScreen->u16Width, pScreen->u16Height );3450 pDrv->pDisplay->handleDisplayResize(uScreenId, pScreen->bitsPerPixel, (uint8_t *)pvVRAM + pFBInfo->u32Offset, pScreen->u32LineSize, pScreen->u16Width, pScreen->u16Height, VBVA_SCREEN_F_ACTIVE); 3437 3451 } 3438 3452 } … … 3859 3873 pFBInfo->u32LineSize = pScreen->u32LineSize; 3860 3874 3875 pFBInfo->flags = pScreen->u16Flags; 3876 3861 3877 if (fNewOrigin) 3862 3878 { … … 3899 3915 return pThis->handleDisplayResize(pScreen->u32ViewIndex, pScreen->u16BitsPerPixel, 3900 3916 (uint8_t *)pvVRAM + pScreen->u32StartOffset, 3901 pScreen->u32LineSize, pScreen->u32Width, pScreen->u32Height );3917 pScreen->u32LineSize, pScreen->u32Width, pScreen->u32Height, pScreen->u16Flags); 3902 3918 } 3903 3919 -
trunk/src/VBox/Main/include/DisplayImpl.h
r34754 r35148 53 53 uint32_t u32LineSize; 54 54 55 uint16_t flags; 56 55 57 VBOXVIDEOINFOHOSTEVENTS *pHostEvents; 56 58 … … 76 78 int w; 77 79 int h; 80 uint16_t flags; 78 81 } pendingResize; 79 82 … … 122 125 123 126 // public methods only for internal purposes 124 int handleDisplayResize (unsigned uScreenId, uint32_t bpp, void *pvVRAM, uint32_t cbLine, int w, int h );127 int handleDisplayResize (unsigned uScreenId, uint32_t bpp, void *pvVRAM, uint32_t cbLine, int w, int h, uint16_t flags); 125 128 void handleDisplayUpdateLegacy (int x, int y, int cx, int cy); 126 129 void handleDisplayUpdate (unsigned uScreenId, int x, int y, int w, int h); … … 243 246 int mLastWidth; 244 247 int mLastHeight; 248 uint16_t mLastFlags; 245 249 246 250 VBVAMEMORY *mpVbvaMemory;
Note:
See TracChangeset
for help on using the changeset viewer.