Changeset 21878 in vbox for trunk/src/VBox/Main/DisplayImpl.cpp
- Timestamp:
- Jul 30, 2009 12:42:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/DisplayImpl.cpp
r21796 r21878 173 173 HRESULT Display::init (Console *aParent) 174 174 { 175 LogFlowThisFunc 175 LogFlowThisFunc(("aParent=%p\n", aParent)); 176 176 177 177 ComAssertRet (aParent, E_INVALIDARG); 178 178 179 179 /* Enclose the state transition NotReady->InInit->Ready */ 180 AutoInitSpan autoInitSpan 181 AssertReturn 182 183 unconst 180 AutoInitSpan autoInitSpan(this); 181 AssertReturn(autoInitSpan.isOk(), E_FAIL); 182 183 unconst(mParent) = aParent; 184 184 185 185 // by default, we have an internal framebuffer which is … … 229 229 void Display::uninit() 230 230 { 231 LogFlowThisFunc 231 LogFlowThisFunc(("\n")); 232 232 233 233 /* Enclose the state transition Ready->InUninit->NotReady */ 234 AutoUninitSpan autoUninitSpan 234 AutoUninitSpan autoUninitSpan(this); 235 235 if (autoUninitSpan.uninitDone()) 236 236 return; … … 243 243 mParent->UnregisterCallback (this); 244 244 245 unconst 245 unconst(mParent).setNull(); 246 246 247 247 if (mpDrv) … … 1317 1317 CheckComArgNotNull(width); 1318 1318 1319 AutoCaller autoCaller 1320 CheckComRCReturnRC 1321 1322 AutoWriteLock alock 1319 AutoCaller autoCaller(this); 1320 CheckComRCReturnRC(autoCaller.rc()); 1321 1322 AutoWriteLock alock(this); 1323 1323 1324 1324 CHECK_CONSOLE_DRV (mpDrv); … … 1339 1339 CheckComArgNotNull(height); 1340 1340 1341 AutoCaller autoCaller 1342 CheckComRCReturnRC 1343 1344 AutoWriteLock alock 1341 AutoCaller autoCaller(this); 1342 CheckComRCReturnRC(autoCaller.rc()); 1343 1344 AutoWriteLock alock(this); 1345 1345 1346 1346 CHECK_CONSOLE_DRV (mpDrv); … … 1362 1362 return E_INVALIDARG; 1363 1363 1364 AutoCaller autoCaller 1365 CheckComRCReturnRC 1366 1367 AutoWriteLock alock 1364 AutoCaller autoCaller(this); 1365 CheckComRCReturnRC(autoCaller.rc()); 1366 1367 AutoWriteLock alock(this); 1368 1368 1369 1369 CHECK_CONSOLE_DRV (mpDrv); … … 1389 1389 CheckComArgOutPointerValid(aFramebuffer); 1390 1390 1391 AutoCaller autoCaller 1392 CheckComRCReturnRC 1393 1394 AutoWriteLock alock 1391 AutoCaller autoCaller(this); 1392 CheckComRCReturnRC(autoCaller.rc()); 1393 1394 AutoWriteLock alock(this); 1395 1395 1396 1396 Console::SafeVMPtrQuiet pVM (mParent); … … 1405 1405 int vrc = VMR3ReqCall (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 1406 1406 (PFNRT) changeFramebuffer, 3, this, aFramebuffer, aScreenId); 1407 if (RT_SUCCESS 1407 if (RT_SUCCESS(vrc)) 1408 1408 vrc = pReq->iStatus; 1409 1409 VMR3ReqFree (pReq); … … 1430 1430 CheckComArgOutPointerValid(aFramebuffer); 1431 1431 1432 AutoCaller autoCaller 1433 CheckComRCReturnRC 1434 1435 AutoWriteLock alock 1432 AutoCaller autoCaller(this); 1433 CheckComRCReturnRC(autoCaller.rc()); 1434 1435 AutoWriteLock alock(this); 1436 1436 1437 1437 /* @todo this should be actually done on EMT. */ … … 1452 1452 ULONG aBitsPerPixel, ULONG aDisplay) 1453 1453 { 1454 AutoCaller autoCaller 1455 CheckComRCReturnRC 1456 1457 AutoWriteLock alock 1454 AutoCaller autoCaller(this); 1455 CheckComRCReturnRC(autoCaller.rc()); 1456 1457 AutoWriteLock alock(this); 1458 1458 1459 1459 CHECK_CONSOLE_DRV (mpDrv); … … 1502 1502 STDMETHODIMP Display::SetSeamlessMode (BOOL enabled) 1503 1503 { 1504 AutoCaller autoCaller 1505 CheckComRCReturnRC 1506 1507 AutoWriteLock alock 1504 AutoCaller autoCaller(this); 1505 CheckComRCReturnRC(autoCaller.rc()); 1506 1507 AutoWriteLock alock(this); 1508 1508 1509 1509 /* Have to leave the lock because the pfnRequestSeamlessChange will call EMT. */ … … 1532 1532 CheckComArgExpr(height, height != 0); 1533 1533 1534 AutoCaller autoCaller 1535 CheckComRCReturnRC 1536 1537 AutoWriteLock alock 1534 AutoCaller autoCaller(this); 1535 CheckComRCReturnRC(autoCaller.rc()); 1536 1537 AutoWriteLock alock(this); 1538 1538 1539 1539 CHECK_CONSOLE_DRV (mpDrv); 1540 1540 1541 1541 Console::SafeVMPtr pVM (mParent); 1542 CheckComRCReturnRC 1542 CheckComRCReturnRC(pVM.rc()); 1543 1543 1544 1544 HRESULT rc = S_OK; … … 1588 1588 1589 1589 STDMETHODIMP Display::TakeScreenShotSlow (ULONG width, ULONG height, 1590 ComSafeArrayOut 1590 ComSafeArrayOut(BYTE, aScreenData)) 1591 1591 { 1592 1592 HRESULT rc = S_OK; … … 1615 1615 CheckComArgExpr(height, height != 0); 1616 1616 1617 AutoCaller autoCaller 1618 CheckComRCReturnRC 1619 1620 AutoWriteLock alock 1617 AutoCaller autoCaller(this); 1618 CheckComRCReturnRC(autoCaller.rc()); 1619 1620 AutoWriteLock alock(this); 1621 1621 1622 1622 CHECK_CONSOLE_DRV (mpDrv); 1623 1623 1624 1624 Console::SafeVMPtr pVM (mParent); 1625 CheckComRCReturnRC 1625 CheckComRCReturnRC(pVM.rc()); 1626 1626 1627 1627 /* … … 1674 1674 LogFlowFuncEnter(); 1675 1675 1676 AutoCaller autoCaller 1677 CheckComRCReturnRC 1678 1679 AutoWriteLock alock 1676 AutoCaller autoCaller(this); 1677 CheckComRCReturnRC(autoCaller.rc()); 1678 1679 AutoWriteLock alock(this); 1680 1680 1681 1681 CHECK_CONSOLE_DRV (mpDrv); 1682 1682 1683 1683 Console::SafeVMPtr pVM (mParent); 1684 CheckComRCReturnRC 1684 CheckComRCReturnRC(pVM.rc()); 1685 1685 1686 1686 HRESULT rc = S_OK; … … 1719 1719 LogFlowFunc (("\n")); 1720 1720 1721 /// @todo (dmik) can we AutoWriteLock alock 1721 /// @todo (dmik) can we AutoWriteLock alock(this); here? 1722 1722 // do it when we switch this class to VirtualBoxBase_NEXT. 1723 1723 // This will require general code review and may add some details. … … 1727 1727 // (and therefore don't use Display lock at all here to save some 1728 1728 // milliseconds). 1729 AutoCaller autoCaller 1730 CheckComRCReturnRC 1729 AutoCaller autoCaller(this); 1730 CheckComRCReturnRC(autoCaller.rc()); 1731 1731 1732 1732 /* this is only valid for external framebuffers */ … … 1755 1755 LogFlowFunc (("\n")); 1756 1756 1757 /// @todo (dmik) can we AutoWriteLock alock 1757 /// @todo (dmik) can we AutoWriteLock alock(this); here? 1758 1758 // do it when we switch this class to VirtualBoxBase_NEXT. 1759 1759 // Tthis will require general code review and may add some details. … … 1763 1763 // (and therefore don't use Display lock at all here to save some 1764 1764 // milliseconds). 1765 AutoCaller autoCaller 1766 CheckComRCReturnRC 1765 AutoCaller autoCaller(this); 1766 CheckComRCReturnRC(autoCaller.rc()); 1767 1767 1768 1768 /* this is only valid for external framebuffers */ … … 1889 1889 LogFlowFunc (("uScreenId = %d\n", uScreenId)); 1890 1890 1891 AssertReturn 1892 AssertReturn 1893 1894 AutoCaller autoCaller 1895 CheckComRCReturnRC 1896 1897 AutoWriteLock alock 1891 AssertReturn(that, VERR_INVALID_PARAMETER); 1892 AssertReturn(uScreenId < that->mcMonitors, VERR_INVALID_PARAMETER); 1893 1894 AutoCaller autoCaller(that); 1895 CheckComRCReturnRC(autoCaller.rc()); 1896 1897 AutoWriteLock alock(that); 1898 1898 1899 1899 DISPLAYFBINFO *pDisplayFBInfo = &that->maFramebuffers[uScreenId];
Note:
See TracChangeset
for help on using the changeset viewer.