Changeset 52667 in vbox
- Timestamp:
- Sep 10, 2014 8:40:37 AM (10 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r51599 r52667 3444 3444 } 3445 3445 3446 /* Reestablish the acceleration status. */3447 if ( pThis->u32VideoAccelEnabled3448 && pThis->pDrv)3449 {3450 pThis->pDrv->pfnVideoAccelEnable(pThis->pDrv, !!pThis->u32VideoAccelEnabled, &pThis->pVMMDevRAMR3->vbvaMemory);3451 }3452 3453 3446 if (pThis->fu32AdditionsOk) 3454 3447 { … … 3497 3490 AssertLogRelRCReturn(rc, rc); 3498 3491 #endif /* VBOX_WITH_HGCM */ 3492 3493 /* Reestablish the acceleration status. */ 3494 if ( pThis->u32VideoAccelEnabled 3495 && pThis->pDrv) 3496 { 3497 pThis->pDrv->pfnVideoAccelEnable(pThis->pDrv, !!pThis->u32VideoAccelEnabled, &pThis->pVMMDevRAMR3->vbvaMemory); 3498 } 3499 3499 3500 3500 VMMDevNotifyGuest(pThis, VMMDEV_EVENT_RESTORED); -
trunk/src/VBox/Main/include/DisplayImpl.h
r52652 r52667 355 355 int32_t volatile mcVideoAccelVRDPRefs; 356 356 357 VBVAMEMORY *mpPendingVbvaMemory;358 bool mfPendingVideoAccelEnable;359 bool mfMachineRunning;360 357 #ifdef VBOX_WITH_CROGL 361 358 bool mfCrOglDataHidden; -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r52652 r52667 108 108 mcVideoAccelVRDPRefs = 0; 109 109 110 mpPendingVbvaMemory = NULL;111 mfPendingVideoAccelEnable = false;112 113 mfMachineRunning = false;114 110 #ifdef VBOX_WITH_CROGL 115 111 mfCrOglDataHidden = false; … … 1617 1613 return VERR_NOT_SUPPORTED; 1618 1614 1619 /*1620 * Verify that the VM is in running state. If it is not,1621 * then this must be postponed until it goes to running.1622 */1623 if (!mfMachineRunning)1624 {1625 Assert (!mfVideoAccelEnabled);1626 1627 LogRelFlowFunc(("Machine is not yet running.\n"));1628 1629 if (fEnable)1630 {1631 mfPendingVideoAccelEnable = fEnable;1632 mpPendingVbvaMemory = pVbvaMemory;1633 }1634 1635 return rc;1636 }1637 1638 1615 /* Check that current status is not being changed */ 1639 1616 if (mfVideoAccelEnabled == fEnable) … … 2171 2148 videoAccelEnterVGA(); 2172 2149 2173 if (mfPendingVideoAccelEnable) 2174 { 2175 /* Acceleration was enabled while machine was not yet running 2176 * due to restoring from saved state. Actually enable acceleration. 2177 */ 2178 Assert(mpPendingVbvaMemory); 2179 2180 /* Acceleration can not be yet enabled.*/ 2181 Assert(mpVbvaMemory == NULL); 2182 Assert(!mfVideoAccelEnabled); 2183 2184 if (mfMachineRunning) 2185 { 2186 i_videoAccelEnable(mfPendingVideoAccelEnable, 2187 mpPendingVbvaMemory); 2188 2189 /* Reset the pending state. */ 2190 mfPendingVideoAccelEnable = false; 2191 mpPendingVbvaMemory = NULL; 2192 } 2193 2194 rc = VINF_TRY_AGAIN; 2195 } 2196 else 2197 { 2198 Assert(mpPendingVbvaMemory == NULL); 2199 2200 if (mfVideoAccelEnabled) 2201 { 2202 Assert(mpVbvaMemory); 2203 rc = i_videoAccelFlush(); 2204 if (RT_FAILURE(rc)) 2205 { 2206 /* Disable on errors. */ 2207 i_videoAccelEnable(false, NULL); 2208 rc = VWRN_INVALID_STATE; /* Do a display update in VGA device. */ 2209 } 2210 else 2211 { 2212 rc = VINF_SUCCESS; 2213 } 2150 if (mfVideoAccelEnabled) 2151 { 2152 Assert(mpVbvaMemory); 2153 rc = i_videoAccelFlush(); 2154 if (RT_FAILURE(rc)) 2155 { 2156 /* Disable on errors. */ 2157 i_videoAccelEnable(false, NULL); 2158 rc = VWRN_INVALID_STATE; /* Do a display update in VGA device. */ 2159 } 2160 else 2161 { 2162 rc = VINF_SUCCESS; 2214 2163 } 2215 2164 } … … 3524 3473 LogRelFlowFunc(("Machine is running.\n")); 3525 3474 3526 mfMachineRunning = true;3527 3528 3475 #ifdef VBOX_WITH_CROGL 3529 3476 i_crOglWindowsShow(true); … … 3532 3479 else 3533 3480 { 3534 mfMachineRunning = false;3535 3536 3481 #ifdef VBOX_WITH_CROGL 3537 3482 if (machineState == MachineState_Paused)
Note:
See TracChangeset
for help on using the changeset viewer.