Changeset 108641 in vbox for trunk/src/VBox/Main/src-client/DisplayImpl.cpp
- Timestamp:
- Mar 20, 2025 12:48:42 PM (3 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168054
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r106061 r108641 52 52 #include <VBox/vmm/pdmdrv.h> 53 53 54 #ifdef VBOX_WITH_VIDEOHWACCEL55 # include <VBoxVideo.h>56 #endif57 54 #include <VBoxVideo3D.h> 58 55 … … 83 80 /** Our display connector interface. */ 84 81 PDMIDISPLAYCONNECTOR IConnector; 85 #if defined(VBOX_WITH_VIDEOHWACCEL)86 /** VBVA callbacks */87 PPDMIDISPLAYVBVACALLBACKS pVBVACallbacks;88 #endif89 82 } DRVMAINDISPLAY, *PDRVMAINDISPLAY; 90 83 … … 2709 2702 } 2710 2703 2711 HRESULT Display::completeVHWACommand(BYTE *aCommand)2712 {2713 #ifdef VBOX_WITH_VIDEOHWACCEL2714 AssertPtr(mpDrv->pVBVACallbacks);2715 mpDrv->pVBVACallbacks->pfnVHWACommandCompleteAsync(mpDrv->pVBVACallbacks, (VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *)aCommand);2716 return S_OK;2717 #else2718 RT_NOREF(aCommand);2719 return E_NOTIMPL;2720 #endif2721 }2722 2723 2704 HRESULT Display::viewportChanged(ULONG aScreenId, ULONG aX, ULONG aY, ULONG aWidth, ULONG aHeight) 2724 2705 { … … 3278 3259 pDrv->pDisplay->processDisplayData(pvVRAM, uScreenId); 3279 3260 } 3280 3281 #ifdef VBOX_WITH_VIDEOHWACCEL3282 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 */3325 3261 3326 3262 int Display::i_handle3DNotifyProcess(VBOX3DNOTIFY *p3DNotify) … … 3855 3791 pThis->pDisplay->mParent->i_recordingStop(); 3856 3792 #endif 3857 #if defined(VBOX_WITH_VIDEOHWACCEL)3858 pThis->pVBVACallbacks = NULL;3859 #endif3860 3793 } 3861 3794 } … … 3892 3825 pThis->pDisplay->mParent->i_recordingStop(); 3893 3826 #endif 3894 #if defined(VBOX_WITH_VIDEOHWACCEL)3895 pThis->pVBVACallbacks = NULL;3896 #endif3897 3898 3827 pThis->pDisplay->mpDrv = NULL; 3899 3828 pThis->pDisplay = NULL; 3900 3829 } 3901 #if defined(VBOX_WITH_VIDEOHWACCEL)3902 pThis->pVBVACallbacks = NULL;3903 #endif3904 3830 } 3905 3831 … … 3937 3863 pThis->IConnector.pfnProcessAdapterData = Display::i_displayProcessAdapterDataCallback; 3938 3864 pThis->IConnector.pfnProcessDisplayData = Display::i_displayProcessDisplayDataCallback; 3939 #ifdef VBOX_WITH_VIDEOHWACCEL3940 pThis->IConnector.pfnVHWACommandProcess = Display::i_displayVHWACommandProcess;3941 #endif3942 3865 #ifdef VBOX_WITH_HGSMI 3943 3866 pThis->IConnector.pfnVBVAEnable = Display::i_displayVBVAEnable; … … 3963 3886 return VERR_PDM_MISSING_INTERFACE_ABOVE; 3964 3887 } 3965 #if defined(VBOX_WITH_VIDEOHWACCEL) 3966 pThis->pVBVACallbacks = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIDISPLAYVBVACALLBACKS); 3967 #endif 3888 3968 3889 /* 3969 3890 * Get the Display object pointer and update the mpDrv member.
Note:
See TracChangeset
for help on using the changeset viewer.