Changeset 66396 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 3, 2017 10:15:06 AM (8 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/DisplayImpl.h
r66394 r66396 34 34 #include "DisplaySourceBitmapWrap.h" 35 35 36 #define NEW_RESIZE 37 36 38 class Console; 37 39 struct VIDEORECCONTEXT; … … 156 158 157 159 // public methods only for internal purposes 160 #ifndef NEW_RESIZE 161 int i_handleDisplayResize(unsigned uScreenId, uint32_t bpp, void *pvVRAM, uint32_t cbLine, 162 uint32_t w, uint32_t h, uint16_t flags); 163 #else 158 164 int i_handleDisplayResize(unsigned uScreenId, uint32_t bpp, void *pvVRAM, 159 165 uint32_t cbLine, uint32_t w, uint32_t h, uint16_t flags, 160 166 uint32_t xOrigin, uint32_t yOrigin, bool fVGAResize); 167 #endif 161 168 void i_handleDisplayUpdate(unsigned uScreenId, int x, int y, int w, int h); 162 169 void i_handleUpdateVMMDevSupportsGraphics(bool fSupportsGraphics); … … 303 310 BitmapFormat_T aBitmapFormat, 304 311 ULONG *pcbOut); 312 #ifdef NEW_RESIZE 305 313 int processVBVAResize(PCVBVAINFOVIEW pView, PCVBVAINFOSCREEN pScreen, void *pvVRAM, bool fResetInputMapping); 314 #endif 306 315 307 316 #ifdef VBOX_WITH_CRHGSMI -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r66394 r66396 889 889 } 890 890 891 #ifndef NEW_RESIZE 892 /** 893 * Handles display resize event. 894 * 895 * @param uScreenId Screen ID 896 * @param bpp New bits per pixel. 897 * @param pvVRAM VRAM pointer. 898 * @param cbLine New bytes per line. 899 * @param w New display width. 900 * @param h New display height. 901 * @param flags Flags of the new video mode. 902 * 903 * @thread EMT 904 */ 905 int Display::i_handleDisplayResize(unsigned uScreenId, uint32_t bpp, void *pvVRAM, 906 uint32_t cbLine, uint32_t w, uint32_t h, uint16_t flags) 907 #else 891 908 /** 892 909 * Handles display resize event. … … 906 923 uint32_t cbLine, uint32_t w, uint32_t h, uint16_t flags, 907 924 uint32_t xOrigin, uint32_t yOrigin, bool fVGAResize) 925 #endif 908 926 { 909 927 LogRel(("Display::handleDisplayResize: uScreenId=%d pvVRAM=%p w=%d h=%d bpp=%d cbLine=0x%X flags=0x%X\n", uScreenId, 910 928 pvVRAM, w, h, bpp, cbLine, flags)); 929 930 #ifndef NEW_RESIZE 931 if (uScreenId >= mcMonitors) 932 return VINF_SUCCESS; 933 934 DISPLAYFBINFO *pFBInfo = &maFramebuffers[uScreenId]; 935 936 /* Reset the update mode. */ 937 pFBInfo->updateImage.pSourceBitmap.setNull(); 938 pFBInfo->updateImage.pu8Address = NULL; 939 pFBInfo->updateImage.cbLine = 0; 940 941 if (uScreenId == VBOX_VIDEO_PRIMARY_SCREEN) 942 { 943 pFBInfo->w = w; 944 pFBInfo->h = h; 945 946 pFBInfo->u16BitsPerPixel = (uint16_t)bpp; 947 pFBInfo->pu8FramebufferVRAM = (uint8_t *)pvVRAM; 948 pFBInfo->u32LineSize = cbLine; 949 pFBInfo->flags = flags; 950 } 951 952 /* Guest screen image will be invalid during resize, make sure that it is not updated. */ 953 if (uScreenId == VBOX_VIDEO_PRIMARY_SCREEN) 954 { 955 if (mpDrv) 956 { 957 mpDrv->pUpPort->pfnSetRenderVRAM(mpDrv->pUpPort, false); 958 959 mpDrv->IConnector.pbData = NULL; 960 mpDrv->IConnector.cbScanline = 0; 961 mpDrv->IConnector.cBits = 32; /* DevVGA does not work with cBits == 0. */ 962 mpDrv->IConnector.cx = 0; 963 mpDrv->IConnector.cy = 0; 964 } 965 } 966 967 maFramebuffers[uScreenId].pSourceBitmap.setNull(); 968 969 if (!maFramebuffers[uScreenId].pFramebuffer.isNull()) 970 { 971 HRESULT hr = maFramebuffers[uScreenId].pFramebuffer->NotifyChange(uScreenId, 0, 0, w, h); /** @todo origin */ 972 LogFunc(("NotifyChange hr %08X\n", hr)); 973 NOREF(hr); 974 } 975 976 bool fUpdateImage = RT_BOOL(pFBInfo->u32Caps & FramebufferCapabilities_UpdateImage); 977 if (fUpdateImage && !pFBInfo->pFramebuffer.isNull()) 978 { 979 ComPtr<IDisplaySourceBitmap> pSourceBitmap; 980 HRESULT hr = QuerySourceBitmap(uScreenId, pSourceBitmap.asOutParam()); 981 if (SUCCEEDED(hr)) 982 { 983 BYTE *pAddress = NULL; 984 ULONG ulWidth = 0; 985 ULONG ulHeight = 0; 986 ULONG ulBitsPerPixel = 0; 987 ULONG ulBytesPerLine = 0; 988 BitmapFormat_T bitmapFormat = BitmapFormat_Opaque; 989 990 hr = pSourceBitmap->QueryBitmapInfo(&pAddress, 991 &ulWidth, 992 &ulHeight, 993 &ulBitsPerPixel, 994 &ulBytesPerLine, 995 &bitmapFormat); 996 if (SUCCEEDED(hr)) 997 { 998 pFBInfo->updateImage.pSourceBitmap = pSourceBitmap; 999 pFBInfo->updateImage.pu8Address = pAddress; 1000 pFBInfo->updateImage.cbLine = ulBytesPerLine; 1001 } 1002 } 1003 } 1004 1005 /* Inform the VRDP server about the change of display parameters. */ 1006 LogRelFlowFunc(("Calling VRDP\n")); 1007 mParent->i_consoleVRDPServer()->SendResize(); 1008 1009 /* And re-send the seamless rectangles if necessary. */ 1010 if (mfSeamlessEnabled) 1011 i_handleSetVisibleRegion(mcRectVisibleRegion, mpRectVisibleRegion); 1012 1013 #ifdef VBOX_WITH_VIDEOREC 1014 videoCaptureScreenChanged(uScreenId); 1015 #endif 1016 1017 #else /* NEW_RESIZE */ 911 1018 912 1019 /* Caller must not hold the object lock. */ … … 980 1087 #endif 981 1088 1089 #endif /* NEW_RESIZE */ 1090 982 1091 LogRelFlowFunc(("[%d]: default format %d\n", uScreenId, pFBInfo->fDefaultFormat)); 983 1092 … … 1040 1149 return; */ 1041 1150 1151 #ifndef NEW_RESIZE 1152 i_checkCoordBounds(&x, &y, &w, &h, maFramebuffers[uScreenId].w, 1153 maFramebuffers[uScreenId].h); 1154 1155 IFramebuffer *pFramebuffer = maFramebuffers[uScreenId].pFramebuffer; 1156 if (pFramebuffer != NULL) 1157 { 1158 if (w != 0 && h != 0) 1159 { 1160 bool fUpdateImage = RT_BOOL(maFramebuffers[uScreenId].u32Caps & FramebufferCapabilities_UpdateImage); 1161 if (RT_LIKELY(!fUpdateImage)) 1162 { 1163 pFramebuffer->NotifyUpdate(x, y, w, h); 1164 } 1165 else 1166 { 1167 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1168 1169 DISPLAYFBINFO *pFBInfo = &maFramebuffers[uScreenId]; 1170 1171 if (!pFBInfo->updateImage.pSourceBitmap.isNull()) 1172 { 1173 Assert(pFBInfo->updateImage.pu8Address); 1174 1175 size_t cbData = w * h * 4; 1176 com::SafeArray<BYTE> image(cbData); 1177 1178 uint8_t *pu8Dst = image.raw(); 1179 const uint8_t *pu8Src = pFBInfo->updateImage.pu8Address + pFBInfo->updateImage.cbLine * y + x * 4; 1180 1181 int i; 1182 for (i = y; i < y + h; ++i) 1183 { 1184 memcpy(pu8Dst, pu8Src, w * 4); 1185 pu8Dst += w * 4; 1186 pu8Src += pFBInfo->updateImage.cbLine; 1187 } 1188 1189 pFramebuffer->NotifyUpdateImage(x, y, w, h, ComSafeArrayAsInParam(image)); 1190 } 1191 } 1192 } 1193 } 1194 #else /* NEW_RESIZE */ 1042 1195 DISPLAYFBINFO *pFBInfo = &maFramebuffers[uScreenId]; 1043 1196 AutoReadLock alockr(this COMMA_LOCKVAL_SRC_POS); … … 1142 1295 } 1143 1296 } 1297 #endif /* NEW_RESIZE */ 1144 1298 1145 1299 #ifndef VBOX_WITH_HGSMI … … 1628 1782 if (!pFBInfo->fDisabled) 1629 1783 { 1784 #ifndef NEW_RESIZE 1785 i_handleDisplayResize(uScreenId, 32, 1786 pFBInfo->pu8FramebufferVRAM, 1787 pFBInfo->u32LineSize, 1788 pFBInfo->w, 1789 pFBInfo->h, 1790 pFBInfo->flags); 1791 #else 1630 1792 i_handleDisplayResize(uScreenId, 32, 1631 1793 pFBInfo->pu8FramebufferVRAM, … … 1637 1799 pFBInfo->yOrigin, 1638 1800 false); 1801 #endif 1639 1802 } 1640 1803 } … … 1710 1873 if (mpDrv) 1711 1874 { 1875 #ifndef NEW_RESIZE 1876 /* Setup the new framebuffer. */ 1877 i_handleDisplayResize(aScreenId, pFBInfo->u16BitsPerPixel, 1878 pFBInfo->pu8FramebufferVRAM, 1879 pFBInfo->u32LineSize, 1880 pFBInfo->w, 1881 pFBInfo->h, 1882 pFBInfo->flags); 1883 #else 1712 1884 /* Inform the framebuffer about the actual screen size. */ 1713 1885 HRESULT hr = aFramebuffer->NotifyChange(aScreenId, 0, 0, pFBInfo->w, pFBInfo->h); /** @todo origin */ … … 1717 1889 if (mfSeamlessEnabled) 1718 1890 i_handleSetVisibleRegion(mcRectVisibleRegion, mpRectVisibleRegion); 1891 #endif 1719 1892 } 1720 1893 … … 2903 3076 if (pFBInfo->pSourceBitmap.isNull()) 2904 3077 { 3078 #ifndef NEW_RESIZE 2905 3079 /* Create a new object. */ 2906 3080 ComObjPtr<DisplaySourceBitmap> obj; … … 2911 3085 if (SUCCEEDED(hr)) 2912 3086 { 2913 pFBInfo->pSourceBitmap = obj; 2914 pFBInfo->fDefaultFormat = !obj->i_usesVRAM(); 3087 bool fDefaultFormat = !obj->i_usesVRAM(); 2915 3088 2916 3089 if (aScreenId == VBOX_VIDEO_PRIMARY_SCREEN) … … 2924 3097 BitmapFormat_T bitmapFormat = BitmapFormat_Opaque; 2925 3098 3099 obj->QueryBitmapInfo(&pAddress, 3100 &ulWidth, 3101 &ulHeight, 3102 &ulBitsPerPixel, 3103 &ulBytesPerLine, 3104 &bitmapFormat); 3105 3106 mpDrv->IConnector.pbData = pAddress; 3107 mpDrv->IConnector.cbScanline = ulBytesPerLine; 3108 mpDrv->IConnector.cBits = ulBitsPerPixel; 3109 mpDrv->IConnector.cx = ulWidth; 3110 mpDrv->IConnector.cy = ulHeight; 3111 3112 fSetRenderVRAM = fDefaultFormat; 3113 } 3114 3115 /* Make sure that the bitmap contains the latest image. */ 3116 fInvalidate = fDefaultFormat; 3117 3118 pFBInfo->pSourceBitmap = obj; 3119 pFBInfo->fDefaultFormat = fDefaultFormat; 3120 } 3121 #else /* NEW_RESIZE */ 3122 /* Create a new object. */ 3123 ComObjPtr<DisplaySourceBitmap> obj; 3124 hr = obj.createObject(); 3125 if (SUCCEEDED(hr)) 3126 hr = obj->init(this, aScreenId, pFBInfo); 3127 3128 if (SUCCEEDED(hr)) 3129 { 3130 pFBInfo->pSourceBitmap = obj; 3131 pFBInfo->fDefaultFormat = !obj->i_usesVRAM(); 3132 3133 if (aScreenId == VBOX_VIDEO_PRIMARY_SCREEN) 3134 { 3135 /* Start buffer updates. */ 3136 BYTE *pAddress = NULL; 3137 ULONG ulWidth = 0; 3138 ULONG ulHeight = 0; 3139 ULONG ulBitsPerPixel = 0; 3140 ULONG ulBytesPerLine = 0; 3141 BitmapFormat_T bitmapFormat = BitmapFormat_Opaque; 3142 2926 3143 pFBInfo->pSourceBitmap->QueryBitmapInfo(&pAddress, 2927 3144 &ulWidth, … … 2943 3160 fInvalidate = pFBInfo->fDefaultFormat; 2944 3161 } 3162 #endif /* NEW_RESIZE */ 2945 3163 } 2946 3164 … … 3138 3356 } 3139 3357 3358 #ifndef NEW_RESIZE 3359 int rc = pThis->i_handleDisplayResize(VBOX_VIDEO_PRIMARY_SCREEN, bpp, pvVRAM, cbLine, cx, cy, VBVA_SCREEN_F_ACTIVE); 3360 #else 3140 3361 int rc = pThis->i_handleDisplayResize(VBOX_VIDEO_PRIMARY_SCREEN, bpp, pvVRAM, cbLine, cx, cy, 3141 3362 VBVA_SCREEN_F_ACTIVE, 0, 0, true); 3363 #endif 3142 3364 3143 3365 /* Restore the flag. */ … … 4136 4358 Display *pThis = pDrv->pDisplay; 4137 4359 4138 return pThis->processVBVAResize(pView, pScreen, pvVRAM, fResetInputMapping); 4139 } 4140 4141 int Display::processVBVAResize(PCVBVAINFOVIEW pView, PCVBVAINFOSCREEN pScreen, void *pvVRAM, bool fResetInputMapping) 4142 { 4143 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 4144 4145 DISPLAYFBINFO *pFBInfo = &maFramebuffers[pScreen->u32ViewIndex]; 4360 #ifndef NEW_RESIZE 4361 DISPLAYFBINFO *pFBInfo = &pThis->maFramebuffers[pScreen->u32ViewIndex]; 4146 4362 4147 4363 if (pScreen->u16Flags & VBVA_SCREEN_F_DISABLED) 4148 4364 { 4365 pThis->i_notifyCroglResize(pView, pScreen, pvVRAM); 4366 4367 pFBInfo->fDisabled = true; 4368 pFBInfo->flags = pScreen->u16Flags; 4369 4149 4370 /* Ask the framebuffer to resize using a default format. The framebuffer will be black. 4150 4371 * So if the frontend does not support GuestMonitorChangedEventType_Disabled event, … … 4152 4373 uint32_t u32Width = pFBInfo->w ? pFBInfo->w : 640; 4153 4374 uint32_t u32Height = pFBInfo->h ? pFBInfo->h : 480; 4154 int32_t xOrigin = pFBInfo->xOrigin; 4155 int32_t yOrigin = pFBInfo->yOrigin; 4156 4157 alock.release(); 4158 4159 i_notifyCroglResize(pView, pScreen, pvVRAM); 4160 4161 i_handleDisplayResize(pScreen->u32ViewIndex, 0, (uint8_t *)NULL, 0, 4162 u32Width, u32Height, pScreen->u16Flags, xOrigin, yOrigin, false); 4163 4164 fireGuestMonitorChangedEvent(mParent->i_getEventSource(), 4375 pThis->i_handleDisplayResize(pScreen->u32ViewIndex, 0, (uint8_t *)NULL, 0, 4376 u32Width, u32Height, pScreen->u16Flags); 4377 4378 fireGuestMonitorChangedEvent(pThis->mParent->i_getEventSource(), 4165 4379 GuestMonitorChangedEventType_Disabled, 4166 4380 pScreen->u32ViewIndex, … … 4191 4405 } 4192 4406 4193 /* Resize if VBVA was just enabled or display was in disabled state.4194 * Also if there is no framebuffer, a resize will be required,because the framebuffer was/will be changed.4407 /* If display was disabled or there is no framebuffer, a resize will be required, 4408 * because the framebuffer was/will be changed. 4195 4409 */ 4196 bool fResize = pFBInfo->fVBVAForceResize || pFBInfo->fDisabled || pFBInfo->pFramebuffer.isNull(); 4197 4198 /* If the screen blanked state is changing, then do a resize request to make sure that the framebuffer 4199 * is notified and requests a new source bitmap. 4410 bool fResize = pFBInfo->fDisabled || pFBInfo->pFramebuffer.isNull(); 4411 4412 if (pFBInfo->fVBVAForceResize) 4413 { 4414 /* VBVA was just enabled. Do the resize. */ 4415 fResize = true; 4416 pFBInfo->fVBVAForceResize = false; 4417 } 4418 4419 /* If the screen if blanked, then do a resize request to make sure that the framebuffer 4420 * switches to the default format. 4200 4421 */ 4201 4422 fResize = fResize || RT_BOOL((pScreen->u16Flags ^ pFBInfo->flags) & VBVA_SCREEN_F_BLANK); … … 4214 4435 || pFBInfo->yOrigin != pScreen->i32OriginY; 4215 4436 4437 if (fNewOrigin || fResize) 4438 pThis->i_notifyCroglResize(pView, pScreen, pvVRAM); 4439 4440 if (pFBInfo->fDisabled) 4441 { 4442 pFBInfo->fDisabled = false; 4443 fireGuestMonitorChangedEvent(pThis->mParent->i_getEventSource(), 4444 GuestMonitorChangedEventType_Enabled, 4445 pScreen->u32ViewIndex, 4446 pScreen->i32OriginX, pScreen->i32OriginY, 4447 pScreen->u32Width, pScreen->u32Height); 4448 /* Continue to update pFBInfo. */ 4449 } 4450 4451 pFBInfo->u32Offset = pView->u32ViewOffset; /* Not used in HGSMI. */ 4452 pFBInfo->u32MaxFramebufferSize = pView->u32MaxScreenSize; /* Not used in HGSMI. */ 4453 pFBInfo->u32InformationSize = 0; /* Not used in HGSMI. */ 4454 4455 pFBInfo->xOrigin = pScreen->i32OriginX; 4456 pFBInfo->yOrigin = pScreen->i32OriginY; 4457 4458 pFBInfo->w = pScreen->u32Width; 4459 pFBInfo->h = pScreen->u32Height; 4460 4461 pFBInfo->u16BitsPerPixel = pScreen->u16BitsPerPixel; 4462 pFBInfo->pu8FramebufferVRAM = (uint8_t *)pvVRAM + pScreen->u32StartOffset; 4463 pFBInfo->u32LineSize = pScreen->u32LineSize; 4464 4465 pFBInfo->flags = pScreen->u16Flags; 4466 4467 if (fResetInputMapping) 4468 { 4469 pThis->xInputMappingOrigin = 0; 4470 pThis->yInputMappingOrigin = 0; 4471 pThis->cxInputMapping = 0; 4472 pThis->cyInputMapping = 0; 4473 } 4474 4475 if (fNewOrigin) 4476 { 4477 fireGuestMonitorChangedEvent(pThis->mParent->i_getEventSource(), 4478 GuestMonitorChangedEventType_NewOrigin, 4479 pScreen->u32ViewIndex, 4480 pScreen->i32OriginX, pScreen->i32OriginY, 4481 0, 0); 4482 } 4483 4484 if (!fResize) 4485 { 4486 /* No parameters of the framebuffer have actually changed. */ 4487 if (fNewOrigin) 4488 { 4489 /* VRDP server still need this notification. */ 4490 LogRelFlowFunc(("Calling VRDP\n")); 4491 pThis->mParent->i_consoleVRDPServer()->SendResize(); 4492 } 4493 return VINF_SUCCESS; 4494 } 4495 4496 /* Do a regular resize. */ 4497 return pThis->i_handleDisplayResize(pScreen->u32ViewIndex, pScreen->u16BitsPerPixel, 4498 (uint8_t *)pvVRAM + pScreen->u32StartOffset, 4499 pScreen->u32LineSize, pScreen->u32Width, pScreen->u32Height, pScreen->u16Flags); 4500 #else /* NEW_RESIZE */ 4501 return pThis->processVBVAResize(pView, pScreen, pvVRAM, fResetInputMapping); 4502 #endif /* NEW_RESIZE */ 4503 } 4504 4505 #ifdef NEW_RESIZE 4506 int Display::processVBVAResize(PCVBVAINFOVIEW pView, PCVBVAINFOSCREEN pScreen, void *pvVRAM, bool fResetInputMapping) 4507 { 4508 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 4509 4510 DISPLAYFBINFO *pFBInfo = &maFramebuffers[pScreen->u32ViewIndex]; 4511 4512 if (pScreen->u16Flags & VBVA_SCREEN_F_DISABLED) 4513 { 4514 /* Ask the framebuffer to resize using a default format. The framebuffer will be black. 4515 * So if the frontend does not support GuestMonitorChangedEventType_Disabled event, 4516 * the VM window will be black. */ 4517 uint32_t u32Width = pFBInfo->w ? pFBInfo->w : 640; 4518 uint32_t u32Height = pFBInfo->h ? pFBInfo->h : 480; 4519 int32_t xOrigin = pFBInfo->xOrigin; 4520 int32_t yOrigin = pFBInfo->yOrigin; 4521 4522 alock.release(); 4523 4524 i_notifyCroglResize(pView, pScreen, pvVRAM); 4525 4526 i_handleDisplayResize(pScreen->u32ViewIndex, 0, (uint8_t *)NULL, 0, 4527 u32Width, u32Height, pScreen->u16Flags, xOrigin, yOrigin, false); 4528 4529 fireGuestMonitorChangedEvent(mParent->i_getEventSource(), 4530 GuestMonitorChangedEventType_Disabled, 4531 pScreen->u32ViewIndex, 4532 0, 0, 0, 0); 4533 return VINF_SUCCESS; 4534 } 4535 4536 VBVAINFOSCREEN screenInfo; 4537 RT_ZERO(screenInfo); 4538 4539 if (pScreen->u16Flags & VBVA_SCREEN_F_BLANK2) 4540 { 4541 /* Init a local VBVAINFOSCREEN structure, which will be used instead of 4542 * the original pScreen. Set VBVA_SCREEN_F_BLANK, which will force 4543 * the code below to choose the "blanking" branches. 4544 */ 4545 screenInfo.u32ViewIndex = pScreen->u32ViewIndex; 4546 screenInfo.i32OriginX = pFBInfo->xOrigin; 4547 screenInfo.i32OriginY = pFBInfo->yOrigin; 4548 screenInfo.u32StartOffset = 0; /* Irrelevant */ 4549 screenInfo.u32LineSize = pFBInfo->u32LineSize; 4550 screenInfo.u32Width = pFBInfo->w; 4551 screenInfo.u32Height = pFBInfo->h; 4552 screenInfo.u16BitsPerPixel = pFBInfo->u16BitsPerPixel; 4553 screenInfo.u16Flags = pScreen->u16Flags | VBVA_SCREEN_F_BLANK; 4554 4555 pScreen = &screenInfo; 4556 } 4557 4558 /* Resize if VBVA was just enabled or display was in disabled state. 4559 * Also if there is no framebuffer, a resize will be required, because the framebuffer was/will be changed. 4560 */ 4561 bool fResize = pFBInfo->fVBVAForceResize || pFBInfo->fDisabled || pFBInfo->pFramebuffer.isNull(); 4562 4563 /* If the screen blanked state is changing, then do a resize request to make sure that the framebuffer 4564 * is notified and requests a new source bitmap. 4565 */ 4566 fResize = fResize || RT_BOOL((pScreen->u16Flags ^ pFBInfo->flags) & VBVA_SCREEN_F_BLANK); 4567 4568 /* Check if this is a real resize or a notification about the screen origin. 4569 * The guest uses this VBVAResize call for both. 4570 */ 4571 fResize = fResize 4572 || pFBInfo->u16BitsPerPixel != pScreen->u16BitsPerPixel 4573 || pFBInfo->pu8FramebufferVRAM != (uint8_t *)pvVRAM + pScreen->u32StartOffset 4574 || pFBInfo->u32LineSize != pScreen->u32LineSize 4575 || pFBInfo->w != pScreen->u32Width 4576 || pFBInfo->h != pScreen->u32Height; 4577 4578 bool fNewOrigin = pFBInfo->xOrigin != pScreen->i32OriginX 4579 || pFBInfo->yOrigin != pScreen->i32OriginY; 4580 4216 4581 /* The event for disabled->enabled transition. */ 4217 4582 const bool fGuestMonitorChangedEvent = pFBInfo->fDisabled; … … 4263 4628 pScreen->i32OriginX, pScreen->i32OriginY, false); 4264 4629 } 4630 #endif /* NEW_RESIZE */ 4265 4631 4266 4632 DECLCALLBACK(int) Display::i_displayVBVAMousePointerShape(PPDMIDISPLAYCONNECTOR pInterface, bool fVisible, bool fAlpha, -
trunk/src/VBox/Main/src-client/DisplayImplLegacy.cpp
r66394 r66396 957 957 } 958 958 959 #ifndef NEW_RESIZE 960 i_handleDisplayResize(uScreenId, pScreen->bitsPerPixel, 961 (uint8_t *)pvVRAM + pFBInfo->u32Offset, 962 pScreen->u32LineSize, 963 pScreen->u16Width, pScreen->u16Height, 964 VBVA_SCREEN_F_ACTIVE); 965 #else 959 966 i_handleDisplayResize(uScreenId, pScreen->bitsPerPixel, 960 967 (uint8_t *)pvVRAM + pFBInfo->u32Offset, … … 963 970 VBVA_SCREEN_F_ACTIVE, 964 971 pScreen->xOrigin, pScreen->yOrigin, false); 972 #endif 965 973 } 966 974 }
Note:
See TracChangeset
for help on using the changeset viewer.