Changeset 75448 in vbox
- Timestamp:
- Nov 14, 2018 1:44:39 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126602
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/DisplayImpl.h
r75352 r75448 322 322 static DECLCALLBACK(int) i_drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags); 323 323 static DECLCALLBACK(void) i_drvDestruct(PPDMDRVINS pDrvIns); 324 static DECLCALLBACK(void) i_drvPowerOff(PPDMDRVINS pDrvIns); 324 325 static DECLCALLBACK(int) i_displayResizeCallback(PPDMIDISPLAYCONNECTOR pInterface, uint32_t bpp, void *pvVRAM, 325 326 uint32_t cbLine, uint32_t cx, uint32_t cy); -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r75361 r75448 3237 3237 } 3238 3238 #endif 3239 3240 3239 #ifdef VBOX_WITH_CRHGSMI 3240 3241 3241 void Display::i_setupCrHgsmiData(void) 3242 3242 { … … 3286 3286 RTCritSectRwLeaveExcl(&mCrOglLock); 3287 3287 } 3288 3288 3289 #endif /* VBOX_WITH_CRHGSMI */ 3289 3290 … … 4476 4477 4477 4478 /** 4478 * Destruct a display driver instance. 4479 * 4480 * @returns VBox status code. 4481 * @param pDrvIns The driver instance data. 4479 * @interface_method_impl{PDMDRVREG,pfnPowerOff, 4480 * Tries to ensure no client calls gets to HGCM or the VGA device from here on.} 4482 4481 */ 4483 DECLCALLBACK(void) Display::i_drvDestruct(PPDMDRVINS pDrvIns) 4484 { 4485 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 4482 DECLCALLBACK(void) Display::i_drvPowerOff(PPDMDRVINS pDrvIns) 4483 { 4486 4484 PDRVMAINDISPLAY pThis = PDMINS_2_DATA(pDrvIns, PDRVMAINDISPLAY); 4487 4485 LogRelFlowFunc(("iInstance=%d\n", pDrvIns->iInstance)); 4488 4486 4489 pThis->pUpPort->pfnSetRenderVRAM(pThis->pUpPort, false); 4487 /* 4488 * Do much of the work that i_drvDestruct does. 4489 */ 4490 if (pThis->pUpPort) 4491 pThis->pUpPort->pfnSetRenderVRAM(pThis->pUpPort, false); 4490 4492 4491 4493 pThis->IConnector.pbData = NULL; … … 4504 4506 pThis->pDisplay->i_destructCrHgsmiData(); 4505 4507 #endif 4508 #if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_WITH_CRHGSMI) 4509 pThis->pVBVACallbacks = NULL; 4510 #endif 4511 } 4512 } 4513 4514 4515 /** 4516 * Destruct a display driver instance. 4517 * 4518 * @returns VBox status code. 4519 * @param pDrvIns The driver instance data. 4520 */ 4521 DECLCALLBACK(void) Display::i_drvDestruct(PPDMDRVINS pDrvIns) 4522 { 4523 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 4524 PDRVMAINDISPLAY pThis = PDMINS_2_DATA(pDrvIns, PDRVMAINDISPLAY); 4525 LogRelFlowFunc(("iInstance=%d\n", pDrvIns->iInstance)); 4526 4527 /* 4528 * We repeat much of what i_drvPowerOff does in case it wasn't called. 4529 * In addition we sever the connection between us and the display. 4530 */ 4531 if (pThis->pUpPort) 4532 pThis->pUpPort->pfnSetRenderVRAM(pThis->pUpPort, false); 4533 4534 pThis->IConnector.pbData = NULL; 4535 pThis->IConnector.cbScanline = 0; 4536 pThis->IConnector.cBits = 32; 4537 pThis->IConnector.cx = 0; 4538 pThis->IConnector.cy = 0; 4539 4540 if (pThis->pDisplay) 4541 { 4542 AutoWriteLock displayLock(pThis->pDisplay COMMA_LOCKVAL_SRC_POS); 4543 #ifdef VBOX_WITH_RECORDING 4544 pThis->pDisplay->mParent->i_recordingStop(); 4545 #endif 4546 #ifdef VBOX_WITH_CRHGSMI 4547 pThis->pDisplay->i_destructCrHgsmiData(); 4548 #endif 4549 #if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_WITH_CRHGSMI) 4550 pThis->pVBVACallbacks = NULL; 4551 #endif 4552 4506 4553 pThis->pDisplay->mpDrv = NULL; 4507 } 4554 pThis->pDisplay = NULL; 4555 } 4556 #if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_WITH_CRHGSMI) 4557 pThis->pVBVACallbacks = NULL; 4558 #endif 4508 4559 } 4509 4560 … … 4657 4708 NULL, 4658 4709 /* pfnPowerOff */ 4659 NULL,4710 Display::i_drvPowerOff, 4660 4711 /* pfnSoftReset */ 4661 4712 NULL,
Note:
See TracChangeset
for help on using the changeset viewer.