Changeset 51605 in vbox
- Timestamp:
- Jun 11, 2014 12:57:05 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 94340
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
r51547 r51605 284 284 285 285 /** 286 * Lock the framebuffer (make its address immutable).287 *288 * @returns COM status code289 */290 STDMETHODIMP VBoxSDLFB::Lock()291 {292 LogFlow(("VBoxSDLFB::Lock\n"));293 RTCritSectEnter(&mUpdateLock);294 return S_OK;295 }296 297 /**298 * Unlock the framebuffer.299 *300 * @returns COM status code301 */302 STDMETHODIMP VBoxSDLFB::Unlock()303 {304 LogFlow(("VBoxSDLFB::Unlock\n"));305 RTCritSectLeave(&mUpdateLock);306 return S_OK;307 }308 309 /**310 * Return the framebuffer start address.311 *312 * @returns COM status code.313 * @param address Pointer to result variable.314 */315 STDMETHODIMP VBoxSDLFB::COMGETTER(Address)(BYTE **address)316 {317 LogFlow(("VBoxSDLFB::GetAddress\n"));318 if (!address)319 return E_INVALIDARG;320 321 if (!mSurfVRAM)322 {323 /* That's actually rather bad. */324 AssertMsgFailed(("mSurfVRAM is NULL!\n"));325 return E_FAIL;326 }327 328 *address = (BYTE *) mSurfVRAM->pixels;329 LogFlow(("VBoxSDL::GetAddress returning %p\n", *address));330 return S_OK;331 }332 333 /**334 286 * Return the current framebuffer color depth. 335 287 * … … 370 322 return E_POINTER; 371 323 *pixelFormat = FramebufferPixelFormat_FOURCC_RGB; 372 return S_OK;373 }374 375 STDMETHODIMP VBoxSDLFB::COMGETTER(UsesGuestVRAM) (BOOL *usesGuestVRAM)376 {377 if (!usesGuestVRAM)378 return E_POINTER;379 *usesGuestVRAM = TRUE;380 324 return S_OK; 381 325 } -
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h
r51547 r51605 74 74 STDMETHOD(COMGETTER(Width))(ULONG *width); 75 75 STDMETHOD(COMGETTER(Height))(ULONG *height); 76 STDMETHOD(Lock)();77 STDMETHOD(Unlock)();78 STDMETHOD(COMGETTER(Address))(BYTE **address);79 76 STDMETHOD(COMGETTER(BitsPerPixel))(ULONG *bitsPerPixel); 80 77 STDMETHOD(COMGETTER(BytesPerLine))(ULONG *bytesPerLine); 81 78 STDMETHOD(COMGETTER(PixelFormat)) (ULONG *pixelFormat); 82 STDMETHOD(COMGETTER(UsesGuestVRAM)) (BOOL *usesGuestVRAM);83 79 STDMETHOD(COMGETTER(HeightReduction)) (ULONG *heightReduction); 84 80 STDMETHOD(COMGETTER(Overlay)) (IFramebufferOverlay **aOverlay); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r51602 r51605 110 110 } 111 111 112 STDMETHODIMP UIFrameBuffer::COMGETTER(Address)(BYTE **ppAddress)113 {114 if (!ppAddress)115 return E_POINTER;116 *ppAddress = address();117 return S_OK;118 }119 120 112 STDMETHODIMP UIFrameBuffer::COMGETTER(Width)(ULONG *puWidth) 121 113 { … … 158 150 } 159 151 160 STDMETHODIMP UIFrameBuffer::COMGETTER(UsesGuestVRAM)(BOOL *pbUsesGuestVRAM)161 {162 if (!pbUsesGuestVRAM)163 return E_POINTER;164 *pbUsesGuestVRAM = true;165 return S_OK;166 }167 168 152 STDMETHODIMP UIFrameBuffer::COMGETTER(HeightReduction)(ULONG *puHeightReduction) 169 153 { … … 187 171 return E_POINTER; 188 172 *pWinId = m_iWinId; 189 return S_OK;190 }191 192 STDMETHODIMP UIFrameBuffer::Lock()193 {194 this->lock();195 return S_OK;196 }197 198 STDMETHODIMP UIFrameBuffer::Unlock()199 {200 this->unlock();201 173 return S_OK; 202 174 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
r51602 r51605 100 100 101 101 /* IFramebuffer COM methods: */ 102 STDMETHOD(COMGETTER(Address))(BYTE **ppAddress);103 102 STDMETHOD(COMGETTER(Width))(ULONG *puWidth); 104 103 STDMETHOD(COMGETTER(Height))(ULONG *puHeight); … … 106 105 STDMETHOD(COMGETTER(BytesPerLine))(ULONG *puBytesPerLine); 107 106 STDMETHOD(COMGETTER(PixelFormat))(ULONG *puPixelFormat); 108 STDMETHOD(COMGETTER(UsesGuestVRAM))(BOOL *pbUsesGuestVRAM);109 107 STDMETHOD(COMGETTER(HeightReduction))(ULONG *puHeightReduction); 110 108 STDMETHOD(COMGETTER(Overlay))(IFramebufferOverlay **ppOverlay); 111 109 STDMETHOD(COMGETTER(WinId))(LONG64 *pWinId); 112 113 /* IFramebuffer sync methods: */114 STDMETHOD(Lock)();115 STDMETHOD(Unlock)();116 110 117 111 /** EMT callback: Notifies frame-buffer about guest-screen size change. -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r51601 r51605 15253 15253 <interface 15254 15254 name="IFramebuffer" extends="$unknown" 15255 uuid=" 29e4a04d-03a7-4860-977b-a987c3e92c2b"15255 uuid="929e4228-f7cf-436d-99a0-dcf6596473b2" 15256 15256 wsmap="managed" 15257 15257 > 15258 <attribute name="address" type="octet" mod="ptr" readonly="yes" wsmap="suppress">15259 <desc>Address of the start byte of the frame buffer.</desc>15260 </attribute>15261 15262 15258 <attribute name="width" type="unsigned long" readonly="yes"> 15263 15259 <desc>Frame buffer width, in pixels.</desc> … … 15293 15289 buffer must be always known. 15294 15290 </note> 15295 </desc>15296 </attribute>15297 15298 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">15299 <desc>15300 Defines whether this frame buffer uses the virtual video card's memory15301 buffer (guest VRAM) directly or not.15302 15291 </desc> 15303 15292 </attribute> … … 15334 15323 </desc> 15335 15324 </attribute> 15336 15337 <method name="lock" wsmap="suppress">15338 <desc>15339 Locks the frame buffer.15340 Gets called by the IDisplay object where this frame buffer is15341 bound to.15342 </desc>15343 </method>15344 15345 <method name="unlock" wsmap="suppress">15346 <desc>15347 Unlocks the frame buffer.15348 Gets called by the IDisplay object where this frame buffer is15349 bound to.15350 </desc>15351 </method>15352 15325 15353 15326 <method name="notifyUpdate" wsmap="suppress"> -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r51604 r51605 1123 1123 if (pFramebuffer != NULL) 1124 1124 { 1125 pFramebuffer->Lock();1126 1127 1125 if (w != 0 && h != 0) 1128 1126 pFramebuffer->NotifyUpdate(x, y, w, h); 1129 1130 pFramebuffer->Unlock();1131 1127 } 1132 1128
Note:
See TracChangeset
for help on using the changeset viewer.