VirtualBox

Changeset 54053 in vbox


Ignore:
Timestamp:
Jan 30, 2015 6:03:39 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
97979
Message:

Main/Display: do not send ACPI events if host cursor capabilities have not changed and remember guest VBVA and host cursor capabilities in the saved state.

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

Legend:

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

    r53965 r54053  
    380380     *  Does not go into the saved state as it is refreshed on restore. */
    381381    bool        mfVMMDevSupportsGraphics;
    382     /** Mirror of the current guest VBVA capabilities.
    383      *  Does not go into the saved state as it is refreshed on restore. */
     382    /** Mirror of the current guest VBVA capabilities. */
    384383    uint32_t    mfGuestVBVACapabilities;
    385     /** Mirror of the current host cursor integration support capability.
    386      *  Does not go into the saved state as it is refreshed on restore. */
    387     uint32_t    mfHostSupportsCursorIntegration;
     384    /** Mirror of the current host cursor capabilities. */
     385    uint32_t    mfHostCursorCapabilities;
    388386
    389387    bool mfSourceBitmapEnabled;
  • trunk/src/VBox/Main/include/DisplayUtils.h

    r53965 r54053  
    2424#define sSSMDisplayVer3 0x00010003
    2525#define sSSMDisplayVer4 0x00010004
     26#define sSSMDisplayVer5 0x00010005
    2627
    2728int readSavedGuestScreenInfo(const Utf8Str &strStateFilePath, uint32_t u32ScreenId,
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r53971 r54053  
    125125    mfVMMDevSupportsGraphics = false;
    126126    mfGuestVBVACapabilities = 0;
     127    mfHostCursorCapabilities = 0;
    127128#endif
    128129#ifdef VBOX_WITH_VPX
     
    511512    SSMR3PutU32(pSSM, that->cxInputMapping);
    512513    SSMR3PutU32(pSSM, that->cyInputMapping);
     514    SSMR3PutU32(pSSM, that->mfGuestVBVACapabilities);
     515    SSMR3PutU32(pSSM, that->mfHostCursorCapabilities);
    513516}
    514517
     
    521524        && uVersion != sSSMDisplayVer2
    522525        && uVersion != sSSMDisplayVer3
    523         && uVersion != sSSMDisplayVer4)
     526        && uVersion != sSSMDisplayVer4
     527        && uVersion != sSSMDisplayVer5)
    524528        return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
    525529    Assert(uPass == SSM_PASS_FINAL); NOREF(uPass);
     
    537541        if (   uVersion == sSSMDisplayVer2
    538542            || uVersion == sSSMDisplayVer3
    539             || uVersion == sSSMDisplayVer4)
     543            || uVersion == sSSMDisplayVer4
     544            || uVersion == sSSMDisplayVer5)
    540545        {
    541546            uint32_t w;
     
    547552        }
    548553        if (   uVersion == sSSMDisplayVer3
    549             || uVersion == sSSMDisplayVer4)
     554            || uVersion == sSSMDisplayVer4
     555            || uVersion == sSSMDisplayVer5)
    550556        {
    551557            int32_t xOrigin;
     
    561567        }
    562568    }
    563     if (uVersion == sSSMDisplayVer4)
     569    if (   uVersion == sSSMDisplayVer4
     570        || uVersion == sSSMDisplayVer5)
    564571    {
    565572        SSMR3GetS32(pSSM, &that->xInputMappingOrigin);
     
    567574        SSMR3GetU32(pSSM, &that->cxInputMapping);
    568575        SSMR3GetU32(pSSM, &that->cyInputMapping);
     576    }
     577    if (uVersion == sSSMDisplayVer5)
     578    {
     579        SSMR3GetU32(pSSM, &that->mfGuestVBVACapabilities);
     580        SSMR3GetU32(pSSM, &that->mfHostCursorCapabilities);
    569581    }
    570582
     
    706718{
    707719    /* Version 2 adds width and height of the framebuffer; version 3 adds
    708      * the framebuffer offset in the virtual desktop and the framebuffer flags.
     720     * the framebuffer offset in the virtual desktop and the framebuffer flags;
     721     * version 4 adds guest to host input event mapping and version 5 adds
     722     * guest VBVA and host cursor capabilities.
    709723     */
    710     int rc = SSMR3RegisterExternal(pUVM, "DisplayData", 0, sSSMDisplayVer4,
     724    int rc = SSMR3RegisterExternal(pUVM, "DisplayData", 0, sSSMDisplayVer5,
    711725                                   mcMonitors * sizeof(uint32_t) * 8 + sizeof(uint32_t),
    712726                                   NULL, NULL, NULL,
     
    11631177     * ensures that mpDrv will remain valid. */
    11641178    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     1179    uint32_t fHostCursorCapabilities =   (mfHostCursorCapabilities | fCapabilitiesAdded)
     1180                                       & ~fCapabilitiesRemoved;
    11651181
    11661182    Console::SafeVMPtr ptrVM(mParent);
     
    11711187    mpDrv->pUpPort->pfnReportHostCursorCapabilities (mpDrv->pUpPort, fCapabilitiesAdded, fCapabilitiesRemoved);
    11721188    if (   mfGuestVBVACapabilities & VBVACAPS_DISABLE_CURSOR_INTEGRATION
    1173         && !(mfGuestVBVACapabilities & VBVACAPS_IRQ))
     1189        && !(mfGuestVBVACapabilities & VBVACAPS_IRQ)
     1190        && fHostCursorCapabilities != mfHostCursorCapabilities)
    11741191    {
    11751192        HRESULT hrc = mParent->i_sendACPIMonitorHotPlugEvent();
     
    11771194            return hrc;
    11781195    }
     1196    mfHostCursorCapabilities = fHostCursorCapabilities;
    11791197    return S_OK;
    11801198}
Note: See TracChangeset for help on using the changeset viewer.

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