Changeset 80360 in vbox for trunk/src/VBox/Main/include/DisplayImpl.h
- Timestamp:
- Aug 21, 2019 8:41:18 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/DisplayImpl.h
r78995 r80360 31 31 #include "DisplayWrap.h" 32 32 33 #ifdef VBOX_WITH_CROGL34 # include <VBox/HostServices/VBoxCrOpenGLSvc.h>35 #endif36 37 33 #include "DisplaySourceBitmapWrap.h" 38 34 #include "GuestScreenInfoWrap.h" … … 88 84 VBVAHOSTFLAGS RT_UNTRUSTED_VOLATILE_GUEST *pVBVAHostFlags; 89 85 #endif /* VBOX_WITH_HGSMI */ 90 91 #ifdef VBOX_WITH_CROGL92 struct93 {94 bool fPending;95 ULONG x;96 ULONG y;97 ULONG width;98 ULONG height;99 } pendingViewportInfo;100 #endif /* VBOX_WITH_CROGL */101 86 102 87 #ifdef VBOX_WITH_RECORDING … … 174 159 int i_handleVHWACommandProcess(int enmCmd, bool fGuestCmd, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCommand); 175 160 #endif 176 #ifdef VBOX_WITH_CRHGSMI177 void i_handleCrHgsmiCommandCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam);178 void i_handleCrHgsmiControlCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam);179 void i_handleCrHgsmiCommandProcess(VBOXVDMACMD_CHROMIUM_CMD RT_UNTRUSTED_VOLATILE_GUEST *pCmd, uint32_t cbCmd);180 void i_handleCrHgsmiControlProcess(VBOXVDMACMD_CHROMIUM_CTL RT_UNTRUSTED_VOLATILE_GUEST *pCtl, uint32_t cbCtl);181 #endif182 #if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)183 int i_handleCrHgcmCtlSubmit(struct VBOXCRCMDCTL RT_UNTRUSTED_VOLATILE_GUEST *pCmd, uint32_t cbCmd,184 PFNCRCTLCOMPLETION pfnCompletion, void *pvCompletion);185 void i_handleCrVRecScreenshotPerform(uint32_t uScreen,186 uint32_t x, uint32_t y, uint32_t uPixelFormat, uint32_t uBitsPerPixel,187 uint32_t uBytesPerLine, uint32_t uGuestWidth, uint32_t uGuestHeight,188 uint8_t *pu8BufferAddress, uint64_t uTimestampMs);189 bool i_handleCrVRecScreenshotBegin(uint32_t uScreen, uint64_t uTimestampMs);190 void i_handleCrVRecScreenshotEnd(uint32_t uScreen, uint64_t uTimestampMs);191 void i_handleVRecCompletion();192 #endif193 194 int i_notifyCroglResize(PCVBVAINFOVIEW pView, PCVBVAINFOSCREEN pScreen, void *pvVRAM);195 161 196 162 int i_saveVisibleRegion(uint32_t cRect, PRTRECT pRect); … … 329 295 int processVBVAResize(PCVBVAINFOVIEW pView, PCVBVAINFOSCREEN pScreen, void *pvVRAM, bool fResetInputMapping); 330 296 331 #ifdef VBOX_WITH_CRHGSMI332 void i_setupCrHgsmiData(void);333 void i_destructCrHgsmiData(void);334 #endif335 336 #if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)337 int i_crViewportNotify(ULONG aScreenId, ULONG x, ULONG y, ULONG width, ULONG height);338 #endif339 340 297 static DECLCALLBACK(void*) i_drvQueryInterface(PPDMIBASE pInterface, const char *pszIID); 341 298 static DECLCALLBACK(int) i_drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags); … … 359 316 #endif 360 317 361 #ifdef VBOX_WITH_CRHGSMI362 static DECLCALLBACK(void) i_displayCrHgsmiCommandProcess(PPDMIDISPLAYCONNECTOR pInterface,363 VBOXVDMACMD_CHROMIUM_CMD RT_UNTRUSTED_VOLATILE_GUEST *pCmd,364 uint32_t cbCmd);365 static DECLCALLBACK(void) i_displayCrHgsmiControlProcess(PPDMIDISPLAYCONNECTOR pInterface,366 VBOXVDMACMD_CHROMIUM_CTL RT_UNTRUSTED_VOLATILE_GUEST *pCtl,367 uint32_t cbCtl);368 369 static DECLCALLBACK(void) i_displayCrHgsmiCommandCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam,370 void *pvContext);371 static DECLCALLBACK(void) i_displayCrHgsmiControlCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam,372 void *pvContext);373 #endif374 #if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)375 static DECLCALLBACK(int) i_displayCrHgcmCtlSubmit(PPDMIDISPLAYCONNECTOR pInterface, struct VBOXCRCMDCTL *pCmd, uint32_t cbCmd,376 PFNCRCTLCOMPLETION pfnCompletion, void *pvCompletion);377 static DECLCALLBACK(void) i_displayCrHgcmCtlSubmitCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam,378 void *pvContext);379 #endif380 318 #ifdef VBOX_WITH_HGSMI 381 319 static DECLCALLBACK(int) i_displayVBVAEnable(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId, … … 400 338 #endif 401 339 402 #if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)403 static DECLCALLBACK(void) i_displayCrVRecScreenshotPerform(void *pvCtx, uint32_t uScreen,404 uint32_t x, uint32_t y,405 uint32_t uBitsPerPixel, uint32_t uBytesPerLine,406 uint32_t uGuestWidth, uint32_t uGuestHeight,407 uint8_t *pu8BufferAddress, uint64_t u64TimeStamp);408 static DECLCALLBACK(bool) i_displayCrVRecScreenshotBegin(void *pvCtx, uint32_t uScreen, uint64_t u64TimeStamp);409 static DECLCALLBACK(void) i_displayCrVRecScreenshotEnd(void *pvCtx, uint32_t uScreen, uint64_t u64TimeStamp);410 411 static DECLCALLBACK(void) i_displayVRecCompletion(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd, int rc, void *pvCompletion);412 #endif413 static DECLCALLBACK(void) i_displayCrCmdFree(struct VBOXCRCMDCTL *pCmd, uint32_t cbCmd, int rc, void *pvCompletion);414 415 340 static DECLCALLBACK(void) i_displaySSMSaveScreenshot(PSSMHANDLE pSSM, void *pvUser); 416 341 static DECLCALLBACK(int) i_displaySSMLoadScreenshot(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass); … … 453 378 int32_t volatile mcVRDPRefs; 454 379 455 /** Accelerate3DEnabled = true && GraphicsControllerType == VBoxVGA. */456 bool mfIsCr3DEnabled;457 458 #ifdef VBOX_WITH_CROGL459 bool mfCrOglDataHidden;460 #endif461 462 #ifdef VBOX_WITH_CRHGSMI463 /* for fast host hgcm calls */464 HGCMCVSHANDLE mhCrOglSvc;465 RTCRITSECTRW mCrOglLock;466 #endif467 #ifdef VBOX_WITH_CROGL468 CR_MAIN_INTERFACE mCrOglCallbacks;469 volatile uint32_t mfCrOglVideoRecState;470 CRVBOXHGCMTAKESCREENSHOT mCrOglScreenshotData;471 VBOXCRCMDCTL_HGCM mCrOglScreenshotCtl;472 #endif473 474 380 /* The legacy VBVA data and methods. */ 475 381 VIDEOACCEL mVideoAccelLegacy; … … 501 407 static int i_displayTakeScreenshotEMT(Display *pDisplay, ULONG aScreenId, uint8_t **ppbData, size_t *pcbData, 502 408 uint32_t *pcx, uint32_t *pcy, bool *pfMemFree); 503 #if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)504 static BOOL i_displayCheckTakeScreenshotCrOgl(Display *pDisplay, ULONG aScreenId, uint8_t *pbData,505 uint32_t u32Width, uint32_t u32Height);506 int i_crCtlSubmit(struct VBOXCRCMDCTL *pCmd, uint32_t cbCmd, PFNCRCTLCOMPLETION pfnCompletion, void *pvCompletion);507 int i_crCtlSubmitSync(struct VBOXCRCMDCTL *pCmd, uint32_t cbCmd);508 /* copies the given command and submits it asynchronously,509 * i.e. the pCmd data may be discarded right after the call returns */510 int i_crCtlSubmitAsyncCmdCopy(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd);511 /* performs synchronous request processing if 3D backend has something to display512 * this is primarily to work-around 3d<->main thread deadlocks on OSX513 * in case of async completion, the command is coppied to the allocated buffer,514 * freeded on command completion515 * can be used for "notification" commands, when client is not interested in command result,516 * that must synchronize with 3D backend only when some 3D data is displayed.517 * The routine does NOT provide any info on whether command is processed asynchronously or not */518 int i_crCtlSubmitSyncIfHasDataForScreen(uint32_t u32ScreenID, struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd);519 #endif520 409 521 410 private: … … 524 413 525 414 void i_updateGuestGraphicsFacility(void); 526 527 #if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)528 int i_crOglWindowsShow(bool fShow);529 #endif530 415 531 416 #ifdef VBOX_WITH_HGSMI
Note:
See TracChangeset
for help on using the changeset viewer.