VirtualBox

Ignore:
Timestamp:
Mar 20, 2025 12:48:42 PM (3 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168054
Message:

Removed 2D video acceleration (aka VHWA / VBOX_WITH_VIDEOHWACCEL). bugref:10756

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r106061 r108641  
    5252#include <VBox/vmm/pdmdrv.h>
    5353
    54 #ifdef VBOX_WITH_VIDEOHWACCEL
    55 # include <VBoxVideo.h>
    56 #endif
    5754#include <VBoxVideo3D.h>
    5855
     
    8380    /** Our display connector interface. */
    8481    PDMIDISPLAYCONNECTOR        IConnector;
    85 #if defined(VBOX_WITH_VIDEOHWACCEL)
    86     /** VBVA callbacks */
    87     PPDMIDISPLAYVBVACALLBACKS   pVBVACallbacks;
    88 #endif
    8982} DRVMAINDISPLAY, *PDRVMAINDISPLAY;
    9083
     
    27092702}
    27102703
    2711 HRESULT Display::completeVHWACommand(BYTE *aCommand)
    2712 {
    2713 #ifdef VBOX_WITH_VIDEOHWACCEL
    2714     AssertPtr(mpDrv->pVBVACallbacks);
    2715     mpDrv->pVBVACallbacks->pfnVHWACommandCompleteAsync(mpDrv->pVBVACallbacks, (VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *)aCommand);
    2716     return S_OK;
    2717 #else
    2718     RT_NOREF(aCommand);
    2719     return E_NOTIMPL;
    2720 #endif
    2721 }
    2722 
    27232704HRESULT Display::viewportChanged(ULONG aScreenId, ULONG aX, ULONG aY, ULONG aWidth, ULONG aHeight)
    27242705{
     
    32783259    pDrv->pDisplay->processDisplayData(pvVRAM, uScreenId);
    32793260}
    3280 
    3281 #ifdef VBOX_WITH_VIDEOHWACCEL
    3282 
    3283 int Display::i_handleVHWACommandProcess(int enmCmd, bool fGuestCmd, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCommand)
    3284 {
    3285     /* bugref:9691 Disable the legacy VHWA interface.
    3286      * Keep the host commands enabled because they are needed when an old saved state is loaded.
    3287      */
    3288     if (fGuestCmd)
    3289         return VERR_NOT_IMPLEMENTED;
    3290 
    3291     unsigned id = (unsigned)pCommand->iDisplay;
    3292     if (id >= mcMonitors)
    3293         return VERR_INVALID_PARAMETER;
    3294 
    3295     ComPtr<IFramebuffer> pFramebuffer;
    3296     AutoReadLock arlock(this COMMA_LOCKVAL_SRC_POS);
    3297     pFramebuffer = maFramebuffers[id].pFramebuffer;
    3298     bool fVHWASupported = RT_BOOL(maFramebuffers[id].u32Caps & FramebufferCapabilities_VHWA);
    3299     arlock.release();
    3300 
    3301     if (pFramebuffer == NULL || !fVHWASupported)
    3302         return VERR_NOT_IMPLEMENTED; /* Implementation is not available. */
    3303 
    3304     HRESULT hr = pFramebuffer->ProcessVHWACommand((BYTE *)pCommand, enmCmd, fGuestCmd);
    3305     if (hr == S_FALSE)
    3306         return VINF_SUCCESS;
    3307     if (SUCCEEDED(hr))
    3308         return VINF_CALLBACK_RETURN;
    3309     if (hr == E_ACCESSDENIED)
    3310         return VERR_INVALID_STATE; /* notify we can not handle request atm */
    3311     if (hr == E_NOTIMPL)
    3312         return VERR_NOT_IMPLEMENTED;
    3313     return VERR_GENERAL_FAILURE;
    3314 }
    3315 
    3316 DECLCALLBACK(int) Display::i_displayVHWACommandProcess(PPDMIDISPLAYCONNECTOR pInterface, int enmCmd, bool fGuestCmd,
    3317                                                        VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCommand)
    3318 {
    3319     PDRVMAINDISPLAY pDrv = PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface);
    3320 
    3321     return pDrv->pDisplay->i_handleVHWACommandProcess(enmCmd, fGuestCmd, pCommand);
    3322 }
    3323 
    3324 #endif /* VBOX_WITH_VIDEOHWACCEL */
    33253261
    33263262int Display::i_handle3DNotifyProcess(VBOX3DNOTIFY *p3DNotify)
     
    38553791        pThis->pDisplay->mParent->i_recordingStop();
    38563792#endif
    3857 #if defined(VBOX_WITH_VIDEOHWACCEL)
    3858         pThis->pVBVACallbacks = NULL;
    3859 #endif
    38603793    }
    38613794}
     
    38923825        pThis->pDisplay->mParent->i_recordingStop();
    38933826#endif
    3894 #if defined(VBOX_WITH_VIDEOHWACCEL)
    3895         pThis->pVBVACallbacks = NULL;
    3896 #endif
    3897 
    38983827        pThis->pDisplay->mpDrv = NULL;
    38993828        pThis->pDisplay = NULL;
    39003829    }
    3901 #if defined(VBOX_WITH_VIDEOHWACCEL)
    3902     pThis->pVBVACallbacks = NULL;
    3903 #endif
    39043830}
    39053831
     
    39373863    pThis->IConnector.pfnProcessAdapterData    = Display::i_displayProcessAdapterDataCallback;
    39383864    pThis->IConnector.pfnProcessDisplayData    = Display::i_displayProcessDisplayDataCallback;
    3939 #ifdef VBOX_WITH_VIDEOHWACCEL
    3940     pThis->IConnector.pfnVHWACommandProcess    = Display::i_displayVHWACommandProcess;
    3941 #endif
    39423865#ifdef VBOX_WITH_HGSMI
    39433866    pThis->IConnector.pfnVBVAEnable            = Display::i_displayVBVAEnable;
     
    39633886        return VERR_PDM_MISSING_INTERFACE_ABOVE;
    39643887    }
    3965 #if defined(VBOX_WITH_VIDEOHWACCEL)
    3966     pThis->pVBVACallbacks = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIDISPLAYVBVACALLBACKS);
    3967 #endif
     3888
    39683889    /*
    39693890     * Get the Display object pointer and update the mpDrv member.
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