VirtualBox

Changeset 22215 in vbox for trunk/src/VBox/Devices/Graphics


Ignore:
Timestamp:
Aug 13, 2009 12:41:04 AM (15 years ago)
Author:
vboxsync
Message:

video hw accel: basics for saved state support

Location:
trunk/src/VBox/Devices/Graphics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r21957 r22215  
    52915291{
    52925292    vga_save(pSSMHandle, PDMINS_2_DATA(pDevIns, PVGASTATE));
     5293#ifdef VBOX_WITH_VIDEOHWACCEL
     5294    return vbvaVHWASaveStateExec(pDevIns, pSSMHandle);
     5295#else
    52935296    return VINF_SUCCESS;
    5294 }
    5295 
     5297#endif
     5298}
     5299
     5300#ifdef VBOX_WITH_VIDEOHWACCEL
     5301static DECLCALLBACK(int) vgaR3SavePrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     5302{
     5303    return vbvaVHWASaveStatePrep(pDevIns, pSSM);
     5304}
     5305#endif
    52965306
    52975307/**
     
    53035313 * @param   u32Version  The data unit version number.
    53045314 */
    5305 static DECLCALLBACK(int) vgaR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t u32Version)
     5315static DECLCALLBACK(int) vgaR3xec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t u32Version)
    53065316{
    53075317    if (vga_load(pSSMHandle, PDMINS_2_DATA(pDevIns, PVGASTATE), u32Version))
    53085318        return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
     5319#ifdef VBOX_WITH_VIDEOHWACCEL
     5320    return vbvaVHWALoadStateExec(pDevIns, pSSMHandle);
     5321#else
    53095322    return VINF_SUCCESS;
     5323#endif
    53105324}
    53115325
     
    55465560                        rc = VERR_INTERNAL_ERROR;
    55475561                    }
     5562#ifdef VBOX_WITH_VIDEOHWACCEL
     5563                    if(rc == VINF_SUCCESS)
     5564                    {
     5565                        rc = vbvaVHWAConstruct(pThis);
     5566                        Assert(RT_SUCCESS(rc));
     5567                    }
     5568#endif
    55485569                }
    55495570                else
     
    59225943    /* save */
    59235944    rc = PDMDevHlpSSMRegister(pDevIns, pDevIns->pDevReg->szDeviceName, iInstance, VGA_SAVEDSTATE_VERSION,
    5924                               sizeof(*pThis), NULL, vgaR3SaveExec, NULL, NULL, vgaR3LoadExec, NULL);
     5945                              sizeof(*pThis),
     5946#ifdef VBOX_WITH_VIDEOHWACCEL
     5947                              NULL, vgaR3SaveExec, NULL,
     5948#else
     5949                              NULL, vgaR3SaveExec, NULL,
     5950#endif
     5951                              NULL, vgaR3xec, NULL);
    59255952    if (RT_FAILURE(rc))
    59265953        return rc;
  • trunk/src/VBox/Devices/Graphics/DevVGA.h

    r20444 r22215  
    453453# ifdef VBOX_WITH_VIDEOHWACCEL
    454454int vbvaVHWACommandCompleteAsynch(PPDMDDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd);
     455
     456int vbvaVHWAConstruct (PVGASTATE pVGAState);
     457int vbvaVHWADisable (PVGASTATE pVGAState);
     458int vbvaVHWASaveStatePrep (PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
     459int vbvaVHWASaveStateExec (PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
     460int vbvaVHWALoadStateExec (PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
    455461# endif
    456462#endif /* VBOX_WITH_HGSMI */
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