Changeset 35633 in vbox for trunk/src/VBox
- Timestamp:
- Jan 19, 2011 4:02:24 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r35612 r35633 763 763 } 764 764 765 /* @todo Merge these two 'if's within one 'if (!pFBInfo->pFramebuffer.isNull())' */ 765 766 if (uScreenId == VBOX_VIDEO_PRIMARY_SCREEN && !pFBInfo->pFramebuffer.isNull()) 766 767 { … … 774 775 pFBInfo->fDefaultFormat = (usesGuestVRAM == FALSE); 775 776 777 /* If the primary framebuffer is disabled, tell the VGA device to not to copy 778 * pixels from VRAM to the framebuffer. 779 */ 776 780 if (pFBInfo->fDisabled) 777 781 mpDrv->pUpPort->pfnSetRenderVRAM (mpDrv->pUpPort, false); … … 779 783 mpDrv->pUpPort->pfnSetRenderVRAM (mpDrv->pUpPort, 780 784 pFBInfo->fDefaultFormat); 785 786 /* If the screen resize was because of disabling, tell framebuffer to repaint. 787 * The framebuffer if now in default format so it will not use guest VRAM 788 * and will show usually black image which is there after framebuffer resize. 789 */ 790 if (pFBInfo->fDisabled) 791 pFBInfo->pFramebuffer->NotifyUpdate(0, 0, mpDrv->IConnector.cx, mpDrv->IConnector.cy); 781 792 } 782 793 else if (!pFBInfo->pFramebuffer.isNull()) … … 786 797 787 798 pFBInfo->fDefaultFormat = (usesGuestVRAM == FALSE); 799 800 /* If the screen resize was because of disabling, tell framebuffer to repaint. 801 * The framebuffer if now in default format so it will not use guest VRAM 802 * and will show usually black image which is there after framebuffer resize. 803 */ 804 if (pFBInfo->fDisabled) 805 pFBInfo->pFramebuffer->NotifyUpdate(0, 0, pFBInfo->w, pFBInfo->h); 788 806 } 789 807 LogFlow(("[%d]: default format %d\n", uScreenId, pFBInfo->fDefaultFormat)); … … 3044 3062 continue; 3045 3063 } 3046 /* Continue with normal processing because the status here is ResizeStatus_Void. */ 3047 if (uScreenId == VBOX_VIDEO_PRIMARY_SCREEN) 3048 { 3049 /* Repaint the display because VM continued to run during the framebuffer resize. */ 3050 if (!pFBInfo->pFramebuffer.isNull()) 3051 { 3052 pDisplay->vbvaLock(); 3053 pDrv->pUpPort->pfnUpdateDisplayAll(pDrv->pUpPort); 3054 pDisplay->vbvaUnlock(); 3055 } 3056 } 3064 /* Continue with normal processing because the status here is ResizeStatus_Void. 3065 * Repaint all displays because VM continued to run during the framebuffer resize. 3066 */ 3067 pDisplay->InvalidateAndUpdateEMT(pDisplay); 3057 3068 } 3058 3069 else if (u32ResizeStatus == ResizeStatus_InProgress) … … 3738 3749 } 3739 3750 3751 bool fResize = pFBInfo->fDisabled; /* If display was disabled, do a resize, because the framebuffer was changed. */ 3752 3740 3753 if (pFBInfo->fDisabled) 3741 3754 { … … 3757 3770 * The guest uses this VBVAResize call for both. 3758 3771 */ 3759 bool fResize = pFBInfo->u16BitsPerPixel != pScreen->u16BitsPerPixel 3760 || pFBInfo->pu8FramebufferVRAM != (uint8_t *)pvVRAM + pScreen->u32StartOffset 3761 || pFBInfo->u32LineSize != pScreen->u32LineSize 3762 || pFBInfo->w != pScreen->u32Width 3763 || pFBInfo->h != pScreen->u32Height; 3772 fResize = fResize 3773 || pFBInfo->u16BitsPerPixel != pScreen->u16BitsPerPixel 3774 || pFBInfo->pu8FramebufferVRAM != (uint8_t *)pvVRAM + pScreen->u32StartOffset 3775 || pFBInfo->u32LineSize != pScreen->u32LineSize 3776 || pFBInfo->w != pScreen->u32Width 3777 || pFBInfo->h != pScreen->u32Height; 3764 3778 3765 3779 bool fNewOrigin = pFBInfo->xOrigin != pScreen->i32OriginX
Note:
See TracChangeset
for help on using the changeset viewer.