Changeset 49420 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Nov 8, 2013 3:54:02 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 90501
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r49311 r49420 3810 3810 #ifdef VBOX_WITH_VIDEOHWACCEL 3811 3811 3812 void Display::handleVHWACommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVHWACMD pCommand) 3812 #ifndef S_FALSE 3813 # define S_FALSE ((HRESULT)1L) 3814 #endif 3815 3816 int Display::handleVHWACommandProcess(PVBOXVHWACMD pCommand) 3813 3817 { 3814 3818 unsigned id = (unsigned)pCommand->iDisplay; 3815 3819 int rc = VINF_SUCCESS; 3816 if (id < mcMonitors) 3817 { 3818 IFramebuffer *pFramebuffer = maFramebuffers[id].pFramebuffer; 3819 #ifdef DEBUG_misha 3820 Assert (pFramebuffer); 3821 #endif 3822 3823 if (pFramebuffer != NULL) 3824 { 3825 HRESULT hr = pFramebuffer->ProcessVHWACommand((BYTE*)pCommand); 3826 if (FAILED(hr)) 3827 { 3828 rc = (hr == E_NOTIMPL) ? VERR_NOT_IMPLEMENTED : VERR_GENERAL_FAILURE; 3829 } 3830 } 3831 else 3832 { 3833 rc = VERR_NOT_IMPLEMENTED; 3834 } 3835 } 3836 else 3837 { 3838 rc = VERR_INVALID_PARAMETER; 3839 } 3840 3841 if (RT_FAILURE(rc)) 3842 { 3843 /* tell the guest the command is complete */ 3844 pCommand->Flags &= (~VBOXVHWACMD_FLAG_HG_ASYNCH); 3845 pCommand->rc = rc; 3846 } 3847 } 3848 3849 DECLCALLBACK(void) Display::displayVHWACommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVHWACMD pCommand) 3820 if (id >= mcMonitors) 3821 return VERR_INVALID_PARAMETER; 3822 3823 ComPtr<IFramebuffer> pFramebuffer; 3824 AutoReadLock arlock(this COMMA_LOCKVAL_SRC_POS); 3825 pFramebuffer = maFramebuffers[id].pFramebuffer; 3826 arlock.release(); 3827 3828 if (pFramebuffer == NULL) 3829 return VERR_INVALID_STATE; /* notify we can not handle request atm */ 3830 3831 HRESULT hr = pFramebuffer->ProcessVHWACommand((BYTE*)pCommand); 3832 if (hr == S_FALSE) 3833 return VINF_SUCCESS; 3834 else if (SUCCEEDED(hr)) 3835 return VINF_CALLBACK_RETURN; 3836 else if (hr == E_ACCESSDENIED) 3837 return VERR_INVALID_STATE; /* notify we can not handle request atm */ 3838 else if (hr == E_NOTIMPL) 3839 return VERR_NOT_IMPLEMENTED; 3840 return VERR_GENERAL_FAILURE; 3841 } 3842 3843 DECLCALLBACK(int) Display::displayVHWACommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVHWACMD pCommand) 3850 3844 { 3851 3845 PDRVMAINDISPLAY pDrv = PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface); 3852 3846 3853 pDrv->pDisplay->handleVHWACommandProcess(pInterface,pCommand);3847 return pDrv->pDisplay->handleVHWACommandProcess(pCommand); 3854 3848 } 3855 3849 #endif
Note:
See TracChangeset
for help on using the changeset viewer.