- Timestamp:
- Apr 8, 2015 1:12:53 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 99432
- Location:
- trunk/src/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r53624 r55133 208 208 static ULONG gcMonitors = 1; 209 209 static ComObjPtr<VBoxSDLFB> gpFramebuffer[64]; 210 static Bstr gaFramebufferId[64]; 210 211 static SDL_Cursor *gpDefaultCursor = NULL; 211 212 #ifdef VBOXSDL_WITH_X11 … … 2008 2009 { 2009 2010 // register our framebuffer 2010 rc = gpDisplay->AttachFramebuffer(i, gpFramebuffer[i] );2011 rc = gpDisplay->AttachFramebuffer(i, gpFramebuffer[i], gaFramebufferId[i].asOutParam()); 2011 2012 if (FAILED(rc)) 2012 2013 { … … 3028 3029 { 3029 3030 for (unsigned i = 0; i < gcMonitors; i++) 3030 gpDisplay->DetachFramebuffer(i );3031 gpDisplay->DetachFramebuffer(i, gaFramebufferId[i].raw()); 3031 3032 } 3032 3033 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r55113 r55133 381 381 CComPtr <IUnknown> m_pUnkMarshaler; 382 382 #endif /* Q_OS_WIN */ 383 /** Identifier returned by AttachFramebuffer. Used in DetachFramebuffer. */ 384 QString m_strFramebufferId; 383 385 }; 384 386 … … 599 601 void UIFrameBufferPrivate::attach() 600 602 { 601 display().AttachFramebuffer(m_uScreenId, CFramebuffer(this));603 m_strFramebufferId = display().AttachFramebuffer(m_uScreenId, CFramebuffer(this)); 602 604 } 603 605 … … 606 608 CFramebuffer frameBuffer = display().QueryFramebuffer(m_uScreenId); 607 609 if (!frameBuffer.isNull()) 608 display().DetachFramebuffer(m_uScreenId); 610 { 611 display().DetachFramebuffer(m_uScreenId, m_strFramebufferId); 612 m_strFramebufferId.clear(); 613 } 609 614 } 610 615 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r55078 r55133 15938 15938 <interface 15939 15939 name="IDisplay" extends="$unknown" 15940 uuid=" 04AA5E91-3816-4990-8C52-59939307E5EF"15940 uuid="94a7faa2-7792-42a3-8535-00770eca1f53" 15941 15941 wsmap="managed" 15942 15942 wrap-hint-server-addinterfaces="IEventListener" … … 15978 15978 <param name="screenId" type="unsigned long" dir="in"/> 15979 15979 <param name="framebuffer" type="IFramebuffer" dir="in"/> 15980 <param name="id" type="uuid" mod="string" dir="return"/> 15980 15981 </method> 15981 15982 … … 15985 15986 </desc> 15986 15987 <param name="screenId" type="unsigned long" dir="in"/> 15988 <param name="id" type="uuid" mod="string" dir="in"/> 15987 15989 </method> 15988 15990 -
trunk/src/VBox/Main/include/DisplayImpl.h
r54828 r55133 48 48 49 49 ComPtr<IFramebuffer> pFramebuffer; 50 com::Guid framebufferId; 50 51 ComPtr<IDisplaySourceBitmap> pSourceBitmap; 51 52 bool fDisabled; … … 225 226 GuestMonitorStatus_T *aGuestMonitorStatus); 226 227 virtual HRESULT attachFramebuffer(ULONG aScreenId, 227 const ComPtr<IFramebuffer> &aFramebuffer); 228 virtual HRESULT detachFramebuffer(ULONG aScreenId); 228 const ComPtr<IFramebuffer> &aFramebuffer, 229 com::Guid &aId); 230 virtual HRESULT detachFramebuffer(ULONG aScreenId, 231 const com::Guid &aId); 229 232 virtual HRESULT queryFramebuffer(ULONG aScreenId, 230 233 ComPtr<IFramebuffer> &aFramebuffer); -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r54841 r55133 1602 1602 1603 1603 1604 HRESULT Display::attachFramebuffer(ULONG aScreenId, const ComPtr<IFramebuffer> &aFramebuffer )1604 HRESULT Display::attachFramebuffer(ULONG aScreenId, const ComPtr<IFramebuffer> &aFramebuffer, com::Guid &aId) 1605 1605 { 1606 1606 LogRelFlowFunc(("aScreenId = %d\n", aScreenId)); … … 1618 1618 1619 1619 pFBInfo->pFramebuffer = aFramebuffer; 1620 pFBInfo->framebufferId.create(); 1621 aId = pFBInfo->framebufferId; 1620 1622 1621 1623 SafeArray<FramebufferCapabilities_T> caps; … … 1663 1665 } 1664 1666 1665 LogRelFlowFunc(("Attached to %d \n", aScreenId));1667 LogRelFlowFunc(("Attached to %d %RTuuid\n", aScreenId, aId.raw())); 1666 1668 return S_OK; 1667 1669 } 1668 1670 1669 HRESULT Display::detachFramebuffer(ULONG aScreenId )1670 { 1671 LogRelFlowFunc(("aScreenId = %d \n", aScreenId));1671 HRESULT Display::detachFramebuffer(ULONG aScreenId, const com::Guid &aId) 1672 { 1673 LogRelFlowFunc(("aScreenId = %d %RTuuid\n", aScreenId, aId.raw())); 1672 1674 1673 1675 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 1679 1681 DISPLAYFBINFO *pFBInfo = &maFramebuffers[aScreenId]; 1680 1682 1683 if (pFBInfo->framebufferId != aId) 1684 { 1685 LogRelFlowFunc(("Invalid framebuffer aScreenId = %d, attached %p\n", aScreenId, pFBInfo->framebufferId.raw())); 1686 return setError(E_FAIL, tr("DetachFramebuffer: Invalid framebuffer object")); 1687 } 1688 1681 1689 pFBInfo->pFramebuffer.setNull(); 1690 pFBInfo->framebufferId.clear(); 1682 1691 1683 1692 alock.release();
Note:
See TracChangeset
for help on using the changeset viewer.