VirtualBox

Ignore:
Timestamp:
May 14, 2013 12:43:28 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: 6749: Moving some code (common for both existing frame-buffers) into base-class.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp

    r45940 r46064  
    151151}
    152152
    153 /** @note This method is called on EMT from under this object's lock */
     153/* This method is called on EMT from under this object's lock! */
    154154STDMETHODIMP UIFrameBuffer::RequestResize(ULONG uScreenId, ULONG uPixelFormat,
    155155                                          BYTE *pVRAM, ULONG uBitsPerPixel, ULONG uBytesPerLine,
     
    174174    unlock();
    175175
     176    return S_OK;
     177}
     178
     179/* This method is called on EMT from under this object's lock! */
     180STDMETHODIMP UIFrameBuffer::NotifyUpdate(ULONG uX, ULONG uY, ULONG uW, ULONG uH)
     181{
     182    /* QWidget::update() is NOT thread safe and seems never will be,
     183     * So we have to post an async event to perform update operation.
     184     * Later the event will be replaced by the corresponding signal stuff: */
     185    QApplication::postEvent(m_pMachineView, new UIRepaintEvent(uX, uY, uW, uH));
    176186    return S_OK;
    177187}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h

    r45940 r46064  
    172172                              BOOL *pbFinished);
    173173
     174    STDMETHOD(NotifyUpdate) (ULONG uX, ULONG uY, ULONG uW, ULONG uH);
     175
    174176    STDMETHOD(VideoModeSupported) (ULONG uWidth, ULONG uHeight, ULONG uBPP,
    175177                                   BOOL *pbSupported);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQImage.cpp

    r46062 r46064  
    4747    UIResizeEvent event(FramebufferPixelFormat_Opaque, NULL, 0, 0, 640, 480);
    4848    resizeEvent(&event);
    49 }
    50 
    51 STDMETHODIMP UIFrameBufferQImage::NotifyUpdate(ULONG uX, ULONG uY, ULONG uW, ULONG uH)
    52 {
    53     /* QWidget::update() is not thread safe and seems never will be,
    54      * So we have to post an async event to perform update operation.
    55      * Later the event will be replaced by the corresponding signal stuff: */
    56     QApplication::postEvent(m_pMachineView, new UIRepaintEvent(uX, uY, uW, uH));
    57     return S_OK;
    5849}
    5950
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQImage.h

    r46062 r46064  
    4848    void paintEvent(QPaintEvent *pEvent);
    4949
    50 protected:
    51 
    52     /* Callback: Guest paint-event stuff: */
    53     STDMETHOD(NotifyUpdate) (ULONG uX, ULONG uY, ULONG uW, ULONG uH);
    54 
    5550private:
    5651
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQuartz2D.cpp

    r46058 r46064  
    7171    Log (("Quartz2D: Deleting\n"));
    7272    clean(false);
    73 }
    74 
    75 /** @note This method is called on EMT from under this object's lock */
    76 STDMETHODIMP UIFrameBufferQuartz2D::NotifyUpdate(ULONG aX, ULONG aY,
    77                                                  ULONG aW, ULONG aH)
    78 {
    79 /*    Log (("Quartz2D: NotifyUpdate %d,%d %dx%d\n", aX, aY, aW, aH));*/
    80 
    81     QApplication::postEvent(m_pMachineView,
    82                             new UIRepaintEvent (aX, aY, aW, aH));
    83     return S_OK;
    8473}
    8574
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQuartz2D.h

    r46058 r46064  
    3838    virtual ~UIFrameBufferQuartz2D();
    3939
    40     STDMETHOD(NotifyUpdate)(ULONG uX, ULONG uY, ULONG uW, ULONG uH);
    4140    STDMETHOD(SetVisibleRegion)(BYTE *pRectangles, ULONG uCount);
    4241
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette