Changeset 19798 in vbox
- Timestamp:
- May 18, 2009 3:50:20 PM (16 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxBFE/Framebuffer.h
r8155 r19798 47 47 ULONG w, ULONG h, BOOL *finished) = 0; 48 48 virtual HRESULT RequestResize(ULONG w, ULONG h, BOOL *finished) = 0; 49 virtual HRESULT SolidFill(ULONG x, ULONG y, ULONG width, ULONG height,50 ULONG color, BOOL *handled) = 0;51 virtual HRESULT CopyScreenBits(ULONG xDst, ULONG yDst, ULONG xSrc, ULONG ySrc,52 ULONG width, ULONG height, BOOL *handled) = 0;53 49 54 50 virtual HRESULT GetVisibleRegion(BYTE *aRectangles, ULONG aCount, ULONG *aCountCopied) = 0; -
trunk/src/VBox/Frontends/VBoxBFE/SDLFramebuffer.cpp
r8155 r19798 312 312 } 313 313 314 HRESULT SDLFramebuffer::SolidFill(ULONG x, ULONG y, ULONG width, ULONG height,315 ULONG color, BOOL *handled)316 {317 return E_NOTIMPL;318 }319 320 HRESULT SDLFramebuffer::CopyScreenBits(ULONG xDst, ULONG yDst, ULONG xSrc, ULONG ySrc,321 ULONG width, ULONG height, BOOL *handled)322 {323 return E_NOTIMPL;324 }325 326 314 HRESULT SDLFramebuffer::GetVisibleRegion(BYTE *aRectangles, ULONG aCount, 327 315 ULONG *aCountCopied) -
trunk/src/VBox/Frontends/VBoxBFE/SDLFramebuffer.h
r8155 r19798 53 53 ULONG w, ULONG h, BOOL *finished); 54 54 virtual HRESULT RequestResize(ULONG w, ULONG h, BOOL *finished); 55 virtual HRESULT SolidFill(ULONG x, ULONG y, ULONG width, ULONG height,56 ULONG color, BOOL *handled);57 virtual HRESULT CopyScreenBits(ULONG xDst, ULONG yDst, ULONG xSrc, ULONG ySrc,58 ULONG width, ULONG height, BOOL *handled);59 55 virtual HRESULT GetVisibleRegion(BYTE *aRectangles, ULONG aCount, ULONG *aCountCopied); 60 56 virtual HRESULT SetVisibleRegion(BYTE *aRectangles, ULONG aCount); -
trunk/src/VBox/Frontends/VBoxHeadless/VideoCapture/FFmpegFB.cpp
r13644 r19798 599 599 } 600 600 601 602 /**603 * Queries whether we support a given accelerated opperation. Since we604 * do not have any way of performing accelerated operations, we always605 * return false in supported.606 *607 * @returns COM status code608 * @param operation The operation being queried609 * @retval supported Whether or not we support that operation610 */611 STDMETHODIMP FFmpegFB::OperationSupported(FramebufferAccelerationOperation_T operation,612 BOOL *supported)613 {614 if (!supported)615 return E_POINTER;616 *supported = false;617 return S_OK;618 }619 620 601 /** 621 602 * Returns whether we like the given video mode. … … 639 620 return E_POINTER; 640 621 *supported = true; 641 return S_OK;642 }643 644 /**645 * Since we currently do not have any way of doing this faster than646 * the VGA device, we simply false in handled. Behaviour taken from647 * src/VBox/RDP/server/framebuffer.cpp.648 */649 STDMETHODIMP FFmpegFB::SolidFill(ULONG x, ULONG y, ULONG width,650 ULONG height, ULONG color, BOOL *handled)651 {652 LogFlow(("FFmpeg::SolidFill called.\n"));653 if (!handled)654 return E_POINTER;655 *handled = false;656 return S_OK;657 }658 659 /**660 * Since we currently do not have any way of doing this faster than661 * the VGA device, we simply false in handled. Behaviour taken from662 * src/VBox/RDP/server/framebuffer.cpp.663 */664 STDMETHODIMP FFmpegFB::CopyScreenBits(ULONG xDst, ULONG yDst, ULONG xSrc,665 ULONG ySrc, ULONG width,666 ULONG height, BOOL *handled)667 {668 LogFlow(("FFmpeg::CopyScreenBits called.\n"));669 if (!handled)670 return E_POINTER;671 *handled = false;672 622 return S_OK; 673 623 } -
trunk/src/VBox/Frontends/VBoxHeadless/VideoCapture/FFmpegFB.h
r19340 r19798 105 105 ULONG bitsPerPixel, ULONG bytesPerLine, 106 106 ULONG w, ULONG h, BOOL *finished); 107 STDMETHOD(OperationSupported)(FramebufferAccelerationOperation_T operation, BOOL *supported);108 107 STDMETHOD(VideoModeSupported)(ULONG width, ULONG height, ULONG bpp, BOOL *supported); 109 STDMETHOD(SolidFill)(ULONG x, ULONG y, ULONG width, ULONG height,110 ULONG color, BOOL *handled);111 STDMETHOD(CopyScreenBits)(ULONG xDst, ULONG yDst, ULONG xSrc, ULONG ySrc,112 ULONG width, ULONG height, BOOL *handled);113 108 STDMETHOD(GetVisibleRegion)(BYTE *rectangles, ULONG count, ULONG *countCopied); 114 109 STDMETHOD(SetVisibleRegion)(BYTE *rectangles, ULONG count); -
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
r15868 r19798 521 521 522 522 /** 523 * Returns which acceleration operations are supported524 *525 * @returns COM status code526 * @param operation acceleration operation code527 * @supported result528 */529 STDMETHODIMP VBoxSDLFB::OperationSupported(FramebufferAccelerationOperation_T operation, BOOL *supported)530 {531 if (!supported)532 return E_POINTER;533 534 // SDL gives us software surfaces, futile535 *supported = false;536 #if 0537 switch (operation)538 {539 case FramebufferAccelerationOperation_SolidFillAcceleration:540 *supported = true;541 break;542 case FramebufferAccelerationOperation_ScreenCopyAcceleration:543 *supported = true;544 break;545 default:546 *supported = false;547 }548 #endif549 return S_OK;550 }551 552 /**553 523 * Returns whether we like the given video mode. 554 524 * … … 581 551 *supported = true; 582 552 } 583 return S_OK;584 }585 586 STDMETHODIMP VBoxSDLFB::SolidFill(ULONG x, ULONG y, ULONG width, ULONG height,587 ULONG color, BOOL *handled)588 {589 if (!handled)590 return E_POINTER;591 // SDL gives us software surfaces, futile592 #if 0593 printf("SolidFill: x: %d, y: %d, w: %d, h: %d, color: %d\n", x, y, width, height, color);594 SDL_Rect rect = { (Sint16)x, (Sint16)y, (Sint16)width, (Sint16)height };595 SDL_FillRect(mScreen, &rect, color);596 //SDL_UpdateRect(mScreen, x, y, width, height);597 *handled = true;598 #else599 *handled = false;600 #endif601 return S_OK;602 }603 604 STDMETHODIMP VBoxSDLFB::CopyScreenBits(ULONG xDst, ULONG yDst, ULONG xSrc, ULONG ySrc,605 ULONG width, ULONG height, BOOL *handled)606 {607 if (!handled)608 return E_POINTER;609 // SDL gives us software surfaces, futile610 #if 0611 SDL_Rect srcRect = { (Sint16)xSrc, (Sint16)ySrc, (Sint16)width, (Sint16)height };612 SDL_Rect dstRect = { (Sint16)xDst, (Sint16)yDst, (Sint16)width, (Sint16)height };613 SDL_BlitSurface(mScreen, &srcRect, mScreen, &dstRect);614 *handled = true;615 #else616 *handled = false;617 #endif618 553 return S_OK; 619 554 } … … 1558 1493 1559 1494 /** 1560 * Queries whether we support a given accelerated opperation. Since we do not currently1561 * support any accelerated operations, we always return false in supported.1562 *1563 * @returns COM status code1564 * @param operation The operation being queried1565 * @retval supported Whether or not we support that operation1566 */1567 STDMETHODIMP VBoxSDLFBOverlay::OperationSupported(FramebufferAccelerationOperation_T1568 operation, BOOL *supported)1569 {1570 if (!supported)1571 return E_POINTER;1572 /* We currently do not support any acceleration here, and will probably not in1573 the forseeable future. */1574 *supported = false;1575 return S_OK;1576 }1577 1578 /**1579 1495 * Returns whether we like the given video mode. 1580 1496 * … … 1598 1514 return S_OK; 1599 1515 } 1600 1601 /**1602 * Fill an area of the framebuffer with solid colour1603 *1604 * @returns COM status code1605 * @param x X co-ordinate of the area to fill, top-left corner1606 * @param y Y co-ordinate of the area to fill, top-left corner1607 * @param width width of the area to fill1608 * @param height height of the area to fill1609 * @param color colour with which to fill the area1610 * @retval handled whether we support this operation or not1611 *1612 * Since we currently do not have any way of doing this faster than1613 * the VGA device, we simply false in handled.1614 */1615 STDMETHODIMP VBoxSDLFBOverlay::SolidFill(ULONG x, ULONG y, ULONG width,1616 ULONG height, ULONG color, BOOL *handled)1617 {1618 LogFlow(("VBoxSDLFBOverlay::SolidFill called\n"));1619 if (!handled)1620 return E_POINTER;1621 *handled = false;1622 return S_OK;1623 }1624 1625 /**1626 * Since we currently do not have any way of doing this faster than1627 * the VGA device, we simply false in handled.1628 */1629 STDMETHODIMP VBoxSDLFBOverlay::CopyScreenBits(ULONG xDst, ULONG yDst, ULONG xSrc,1630 ULONG ySrc, ULONG width,1631 ULONG height, BOOL *handled)1632 {1633 LogFlow(("VBoxSDLFBOverlay::CopyScreenBits called.\n"));1634 if (!handled)1635 return E_POINTER;1636 *handled = false;1637 return S_OK;1638 }1639 -
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h
r19134 r19798 106 106 ULONG bitsPerPixel, ULONG bytesPerLine, 107 107 ULONG w, ULONG h, BOOL *finished); 108 STDMETHOD(OperationSupported)(FramebufferAccelerationOperation_T operation, BOOL *supported);109 108 STDMETHOD(VideoModeSupported)(ULONG width, ULONG height, ULONG bpp, BOOL *supported); 110 STDMETHOD(SolidFill)(ULONG x, ULONG y, ULONG width, ULONG height,111 ULONG color, BOOL *handled);112 STDMETHOD(CopyScreenBits)(ULONG xDst, ULONG yDst, ULONG xSrc, ULONG ySrc,113 ULONG width, ULONG height, BOOL *handled);114 109 115 110 STDMETHOD(GetVisibleRegion)(BYTE *aRectangles, ULONG aCount, ULONG *aCountCopied); … … 278 273 ULONG bitsPerPixel, ULONG bytesPerLine, 279 274 ULONG w, ULONG h, BOOL *finished); 280 STDMETHOD(OperationSupported)(FramebufferAccelerationOperation_T operation,281 BOOL *supported);282 275 STDMETHOD(VideoModeSupported)(ULONG width, ULONG height, ULONG bpp, BOOL *supported); 283 STDMETHOD(SolidFill)(ULONG x, ULONG y, ULONG width, ULONG height,284 ULONG color, BOOL *handled);285 STDMETHOD(CopyScreenBits)(ULONG xDst, ULONG yDst, ULONG xSrc, ULONG ySrc,286 ULONG width, ULONG height, BOOL *handled);287 276 288 277 // internal public methods -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h
r19670 r19798 200 200 BOOL *aFinished); 201 201 202 STDMETHOD(OperationSupported)(FramebufferAccelerationOperation_T aOperation,203 BOOL *aSupported);204 202 STDMETHOD(VideoModeSupported) (ULONG aWidth, ULONG aHeight, ULONG aBPP, 205 203 BOOL *aSupported); 206 STDMETHOD(SolidFill) (ULONG aX, ULONG aY, ULONG aWidth, ULONG aHeight,207 ULONG aColor, BOOL *aHandled);208 STDMETHOD(CopyScreenBits) (ULONG aXDst, ULONG aYDst, ULONG aXSrc, ULONG aYSrc,209 ULONG aWidth, ULONG aHeight, BOOL *aHandled);210 204 211 205 STDMETHOD(GetVisibleRegion)(BYTE *aRectangles, ULONG aCount, ULONG *aCountCopied); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFrameBuffer.cpp
r19723 r19798 187 187 } 188 188 189 STDMETHODIMP190 VBoxFrameBuffer::OperationSupported (FramebufferAccelerationOperation_T aOperation,191 BOOL *aSupported)192 {193 NOREF(aOperation);194 if (!aSupported)195 return E_POINTER;196 *aSupported = FALSE;197 return S_OK;198 }199 200 189 /** 201 190 * Returns whether we like the given video mode. … … 228 217 LogFlowThisFunc(("screenW=%lu, screenH=%lu -> aSupported=%s\n", 229 218 screen.width(), screen.height(), *aSupported ? "TRUE" : "FALSE")); 230 return S_OK;231 }232 233 STDMETHODIMP VBoxFrameBuffer::SolidFill (ULONG aX, ULONG aY,234 ULONG aWidth, ULONG aHeight,235 ULONG aColor, BOOL *aHandled)236 {237 NOREF(aX);238 NOREF(aY);239 NOREF(aWidth);240 NOREF(aHeight);241 NOREF(aColor);242 if (!aHandled)243 return E_POINTER;244 *aHandled = FALSE;245 return S_OK;246 }247 248 STDMETHODIMP VBoxFrameBuffer::CopyScreenBits (ULONG aXDst, ULONG aYDst,249 ULONG aXSrc, ULONG aYSrc,250 ULONG aWidth, ULONG aHeight,251 BOOL *aHandled)252 {253 NOREF(aXDst);254 NOREF(aYDst);255 NOREF(aXSrc);256 NOREF(aYSrc);257 NOREF(aWidth);258 NOREF(aHeight);259 if (!aHandled)260 return E_POINTER;261 *aHandled = FALSE;262 219 return S_OK; 263 220 } -
trunk/src/VBox/Main/DisplayImpl.cpp
r19588 r19798 1990 1990 that->mInternalFramebuffer = aInternal; 1991 1991 that->mSupportedAccelOps = 0; 1992 1993 /* determine which acceleration functions are supported by this framebuffer */1994 if (aFB && !aInternal)1995 {1996 HRESULT rc;1997 BOOL accelSupported = FALSE;1998 rc = aFB->OperationSupported (1999 FramebufferAccelerationOperation_SolidFillAcceleration, &accelSupported);2000 AssertComRC (rc);2001 if (accelSupported)2002 that->mSupportedAccelOps |=2003 FramebufferAccelerationOperation_SolidFillAcceleration;2004 accelSupported = FALSE;2005 rc = aFB->OperationSupported (2006 FramebufferAccelerationOperation_ScreenCopyAcceleration, &accelSupported);2007 AssertComRC (rc);2008 if (accelSupported)2009 that->mSupportedAccelOps |=2010 FramebufferAccelerationOperation_ScreenCopyAcceleration;2011 }2012 1992 2013 1993 that->mParent->consoleVRDPServer()->SendResize (); -
trunk/src/VBox/Main/FramebufferImpl.cpp
r14972 r19798 177 177 } 178 178 179 STDMETHODIMP InternalFramebuffer::OperationSupported(FramebufferAccelerationOperation_T operation,180 BOOL *supported)181 {182 CheckComArgOutPointerValid(supported);183 /* no acceleration please, we're a slow fallback implementation! */184 *supported = false;185 return S_OK;186 }187 188 179 STDMETHODIMP InternalFramebuffer::VideoModeSupported(ULONG width, ULONG height, ULONG bpp, 189 180 BOOL *supported) … … 195 186 } 196 187 197 STDMETHODIMP InternalFramebuffer::SolidFill(ULONG x, ULONG y, ULONG width, ULONG height,198 ULONG color, BOOL *handled)199 {200 CheckComArgOutPointerValid(handled);201 /* eek, what do you expect from us?! */202 *handled = false;203 return S_OK;204 }205 206 STDMETHODIMP InternalFramebuffer::CopyScreenBits(ULONG xDst, ULONG yDst, ULONG xSrc, ULONG ySrc,207 ULONG width, ULONG height, BOOL *handled)208 {209 CheckComArgOutPointerValid(handled);210 /* eek, what do you expect from us?! */211 *handled = false;212 return S_OK;213 }214 215 188 STDMETHODIMP InternalFramebuffer::GetVisibleRegion(BYTE *aRectangles, ULONG aCount, 216 189 ULONG *aCountCopied) -
trunk/src/VBox/Main/cbinding/VBoxCAPI_v2_2.h
r18896 r19798 1181 1181 1182 1182 1183 /* Start of enum FramebufferAccelerationOperation Declaration */1184 #define FRAMEBUFFERACCELERATIONOPERATION_IID_STR "f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"1185 #define FRAMEBUFFERACCELERATIONOPERATION_IID { \1186 0xf0e5ebbe, 0xdc8e, 0x4e2d, \1187 { 0x91, 0x6e, 0x53, 0xba, 0xa3, 0x84, 0x4d, 0xf8 } \1188 }1189 enum FramebufferAccelerationOperation1190 {1191 FramebufferAccelerationOperation_SolidFillAcceleration = 1,1192 FramebufferAccelerationOperation_ScreenCopyAcceleration = 21193 };1194 /* End of enum FramebufferAccelerationOperation Declaration */1195 1196 1197 1183 /* Start of enum FramebufferPixelFormat Declaration */ 1198 1184 #define FRAMEBUFFERPIXELFORMAT_IID_STR "7acfd5ed-29e3-45e3-8136-73c9224f3d2d" … … 3757 3743 ); 3758 3744 3759 nsresult (*OperationSupported)(3760 IFramebuffer *pThis,3761 PRUint32 operation,3762 PRBool * supported3763 );3764 3765 3745 nsresult (*VideoModeSupported)( 3766 3746 IFramebuffer *pThis, … … 3769 3749 PRUint32 bpp, 3770 3750 PRBool * supported 3771 );3772 3773 nsresult (*SolidFill)(3774 IFramebuffer *pThis,3775 PRUint32 x,3776 PRUint32 y,3777 PRUint32 width,3778 PRUint32 height,3779 PRUint32 color,3780 PRBool * handled3781 );3782 3783 nsresult (*CopyScreenBits)(3784 IFramebuffer *pThis,3785 PRUint32 xDst,3786 PRUint32 yDst,3787 PRUint32 xSrc,3788 PRUint32 ySrc,3789 PRUint32 width,3790 PRUint32 height,3791 PRBool * handled3792 3751 ); 3793 3752 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r19695 r19798 10248 10248 10249 10249 <enum 10250 name="FramebufferAccelerationOperation"10251 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"10252 >10253 <desc>10254 Frame buffer acceleration operation.10255 </desc>10256 10257 <const name="SolidFillAcceleration" value="1"/>10258 <const name="ScreenCopyAcceleration" value="2"/>10259 </enum>10260 10261 <enum10262 10250 name="FramebufferPixelFormat" 10263 10251 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d" … … 10288 10276 <interface 10289 10277 name="IFramebuffer" extends="$unknown" 10290 uuid=" af431304-5b09-40e2-94da-3c3cb03822c1"10278 uuid="3ce29e6d-835a-4283-8ee0-eb9971b81d81" 10291 10279 wsmap="suppress" 10292 10280 > … … 10519 10507 </method> 10520 10508 10521 <method name="operationSupported">10522 <desc>10523 Returns whether the given acceleration operation is supported10524 by the IFramebuffer implementation. If not, the display object10525 will not attempt to call the corresponding IFramebuffer entry10526 point. Even if an operation is indicated as supported, the10527 IFramebuffer implementation always has the option to return non10528 supported from the corresponding acceleration method in which10529 case the operation will be performed by the display engine. This10530 allows for reduced IFramebuffer implementation complexity where10531 only common cases are handled.10532 </desc>10533 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>10534 <param name="supported" type="boolean" dir="return"/>10535 </method>10536 10537 10509 <method name="videoModeSupported"> 10538 10510 <desc> … … 10549 10521 <param name="bpp" type="unsigned long" dir="in"/> 10550 10522 <param name="supported" type="boolean" dir="return"/> 10551 </method>10552 10553 <method name="solidFill">10554 <desc>10555 Fills the specified rectangle on screen with a solid color.10556 </desc>10557 <param name="x" type="unsigned long" dir="in"/>10558 <param name="y" type="unsigned long" dir="in"/>10559 <param name="width" type="unsigned long" dir="in"/>10560 <param name="height" type="unsigned long" dir="in"/>10561 <param name="color" type="unsigned long" dir="in"/>10562 <param name="handled" type="boolean" dir="return"/>10563 </method>10564 10565 <method name="copyScreenBits">10566 <desc>10567 Copies specified rectangle on the screen.10568 </desc>10569 <param name="xDst" type="unsigned long" dir="in"/>10570 <param name="yDst" type="unsigned long" dir="in"/>10571 <param name="xSrc" type="unsigned long" dir="in"/>10572 <param name="ySrc" type="unsigned long" dir="in"/>10573 <param name="width" type="unsigned long" dir="in"/>10574 <param name="height" type="unsigned long" dir="in"/>10575 <param name="handled" type="boolean" dir="return"/>10576 10523 </method> 10577 10524 -
trunk/src/VBox/Main/include/FramebufferImpl.h
r19239 r19798 69 69 ULONG bpp, ULONG bpl, ULONG w, ULONG h, 70 70 BOOL *finished); 71 STDMETHOD(OperationSupported)(FramebufferAccelerationOperation_T operation,72 BOOL *supported);73 71 STDMETHOD(VideoModeSupported)(ULONG width, ULONG height, ULONG bpp, BOOL *supported); 74 STDMETHOD(SolidFill)(ULONG x, ULONG y, ULONG width, ULONG height,75 ULONG color, BOOL *handled);76 STDMETHOD(CopyScreenBits)(ULONG xDst, ULONG yDst, ULONG xSrc, ULONG ySrc,77 ULONG width, ULONG height, BOOL *handled);78 72 79 73 STDMETHOD(GetVisibleRegion)(BYTE *aRectangles, ULONG aCount, ULONG *aCountCopied);
Note:
See TracChangeset
for help on using the changeset viewer.