VirtualBox

Changeset 53053 in vbox for trunk


Ignore:
Timestamp:
Oct 14, 2014 11:17:08 AM (10 years ago)
Author:
vboxsync
Message:

DisplayImpl: cleanup - inlined handleResizeCompletedEMT, removed old display disable hack.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r52978 r53053  
    381381#endif
    382382
    383     void i_handleResizeCompletedEMT(unsigned uScreenId, BOOL fResizeContext);
    384 
    385383    /* The legacy VBVA data and methods. */
    386384    VIDEOACCEL mVideoAccelLegacy;
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r52979 r53053  
    886886    }
    887887
    888     i_handleResizeCompletedEMT(uScreenId, TRUE);
    889 
    890888    bool fUpdateImage = RT_BOOL(pFBInfo->u32Caps & FramebufferCapabilities_UpdateImage);
    891889    if (fUpdateImage && !pFBInfo->pFramebuffer.isNull())
     
    917915    }
    918916
     917    /* Inform the VRDP server about the change of display parameters. */
     918    LogRelFlowFunc(("Calling VRDP\n"));
     919    mParent->i_consoleVRDPServer()->SendResize();
     920
     921    LogRelFlowFunc(("[%d]: default format %d\n", uScreenId, pFBInfo->fDefaultFormat));
     922
    919923    return VINF_SUCCESS;
    920 }
    921 
    922 /**
    923  *  Framebuffer has been resized.
    924  *  Read the new display data and unlock the framebuffer.
    925  *
    926  *  @thread EMT
    927  */
    928 void Display::i_handleResizeCompletedEMT(unsigned uScreenId, BOOL fResizeContext)
    929 {
    930     LogRelFlowFunc(("\n"));
    931 
    932     do /* to use 'break' */
    933     {
    934         if (uScreenId >= mcMonitors)
    935         {
    936             break;
    937         }
    938 
    939         DISPLAYFBINFO *pFBInfo = &maFramebuffers[uScreenId];
    940 
    941         /* Inform VRDP server about the change of display parameters.
    942          * Must be done before calling NotifyUpdate below.
    943          */
    944         LogRelFlowFunc(("Calling VRDP\n"));
    945         mParent->i_consoleVRDPServer()->SendResize();
    946 
    947         /* @todo Merge these two 'if's within one 'if (!pFBInfo->pFramebuffer.isNull())' */
    948         if (uScreenId == VBOX_VIDEO_PRIMARY_SCREEN && !pFBInfo->pFramebuffer.isNull())
    949         {
    950             /* If the screen resize was because of disabling, tell framebuffer to repaint.
    951              * The framebuffer if now in default format so it will not use guest VRAM
    952              * and will show usually black image which is there after framebuffer resize.
    953              */
    954             if (pFBInfo->fDisabled)
    955                 pFBInfo->pFramebuffer->NotifyUpdate(0, 0, mpDrv->IConnector.cx, mpDrv->IConnector.cy);
    956         }
    957         else if (!pFBInfo->pFramebuffer.isNull())
    958         {
    959             /* If the screen resize was because of disabling, tell framebuffer to repaint.
    960              * The framebuffer if now in default format so it will not use guest VRAM
    961              * and will show usually black image which is there after framebuffer resize.
    962              */
    963             if (pFBInfo->fDisabled)
    964                 pFBInfo->pFramebuffer->NotifyUpdate(0, 0, pFBInfo->w, pFBInfo->h);
    965         }
    966         LogRelFlow(("[%d]: default format %d\n", uScreenId, pFBInfo->fDefaultFormat));
    967     } while(0);
    968924}
    969925
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette