VirtualBox

Changeset 19844 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
May 19, 2009 11:12:55 PM (16 years ago)
Author:
vboxsync
Message:

HGSMI: post host VBVA commands to display; Video HW Accel: mechanism for passing/processing commands to framebuffer

Location:
trunk/src/VBox/Frontends
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxBFE/Framebuffer.h

    r19817 r19844  
    5050    virtual HRESULT SetVisibleRegion(BYTE *aRectangles, ULONG aCount) = 0;
    5151
     52    virtual HRESULT ProcessVHWACommand(BYTE *pCommand) = 0;
     53
    5254    virtual void    repaint() = 0;
    5355    virtual void    resize() = 0;
  • trunk/src/VBox/Frontends/VBoxBFE/SDLFramebuffer.cpp

    r19817 r19844  
    336336}
    337337
     338HRESULT SDLFramebuffer::ProcessVHWACommand(BYTE *pCommand)
     339{
     340    return E_NOTIMPL;
     341}
     342
    338343//
    339344// Internal public methods
  • trunk/src/VBox/Frontends/VBoxBFE/SDLFramebuffer.h

    r19817 r19844  
    5555    virtual HRESULT SetVisibleRegion(BYTE *aRectangles, ULONG aCount);
    5656
     57    virtual HRESULT ProcessVHWACommand(BYTE *pCommand);
     58
    5759    virtual void    repaint();
    5860    virtual void    resize();
  • trunk/src/VBox/Frontends/VBoxHeadless/VideoCapture/FFmpegFB.cpp

    r19817 r19844  
    634634}
    635635
    636 
     636STDMETHODIMP FFmpegFB::ProcessVHWACommand(BYTE *pCommand)
     637{
     638    return E_NOTIMPL;
     639}
    637640// Private Methods
    638641//////////////////////////////////////////////////////////////////////////
  • trunk/src/VBox/Frontends/VBoxHeadless/VideoCapture/FFmpegFB.h

    r19817 r19844  
    107107    STDMETHOD(GetVisibleRegion)(BYTE *rectangles, ULONG count, ULONG *countCopied);
    108108    STDMETHOD(SetVisibleRegion)(BYTE *rectangles, ULONG count);
     109
     110    STDMETHOD(ProcessVHWACommand)(BYTE *pCommand);
    109111
    110112private:
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp

    r19817 r19844  
    578578}
    579579
     580STDMETHODIMP VBoxSDLFB::ProcessVHWACommand(BYTE *pCommand)
     581{
     582    return E_NOTIMPL;
     583}
    580584//
    581585// Internal public methods
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h

    r19817 r19844  
    109109    STDMETHOD(GetVisibleRegion)(BYTE *aRectangles, ULONG aCount, ULONG *aCountCopied);
    110110    STDMETHOD(SetVisibleRegion)(BYTE *aRectangles, ULONG aCount);
     111
     112    STDMETHOD(ProcessVHWACommand)(BYTE *pCommand);
    111113
    112114    // internal public methods
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r19837 r19844  
    434434endif
    435435
     436ifdef VBOX_WITH_VIDEOHWACCEL
     437 VirtualBox_DEFS += VBOX_WITH_VIDEOHWACCEL
     438endif
     439
    436440# The Qt modules we're using.
    437441# (The include directory and lib/framework for each module will be added by the Qt4 unit.)
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h

    r18654 r19844  
    218218    bool isRunning() { return mLastState == KMachineState_Running; }
    219219
     220#ifdef VBOX_WITH_VIDEOHWACCEL
     221    void handleVHWACommand(struct _VBOXVHWACMD *pCommand);
     222#endif
     223
    220224    static void dimImage (QImage &img);
    221225
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h

    r19670 r19844  
    126126        AddVDMUrlsEventType,
    127127        ChangeDockIconUpdateEventType
     128#ifdef VBOX_WITH_VIDEOHWACCEL
     129        ,
     130        VHWACommandProcessType
     131#endif
    128132    };
    129133
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h

    r19817 r19844  
    114114};
    115115
     116#ifdef VBOX_WITH_VIDEOHWACCEL
     117class VBoxVHWACommandProcessEvent : public QEvent
     118{
     119public:
     120    VBoxVHWACommandProcessEvent (struct _VBOXVHWACMD * pCmd)
     121        : QEvent ((QEvent::Type) VBoxDefs::VHWACommandProcessType)
     122        , mpCmd (pCmd) {}
     123    struct _VBOXVHWACMD * command() { return mpCmd; }
     124private:
     125    struct _VBOXVHWACMD * mpCmd;
     126};
     127
     128#endif
     129
    116130/////////////////////////////////////////////////////////////////////////////
    117131
     
    205219    STDMETHOD(GetVisibleRegion)(BYTE *aRectangles, ULONG aCount, ULONG *aCountCopied);
    206220    STDMETHOD(SetVisibleRegion)(BYTE *aRectangles, ULONG aCount);
     221
     222    STDMETHOD(ProcessVHWACommand)(BYTE *pCommand);
    207223
    208224    ulong width() { return mWdt; }
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp

    r19817 r19844  
    9292# include <VBox/err.h>
    9393#endif /* defined (Q_WS_MAC) */
     94
     95#ifdef VBOX_WITH_VIDEOHWACCEL
     96#include <VBox/VBoxVideo.h>
     97#endif
    9498
    9599#if defined (Q_WS_WIN32)
     
    16891693            }
    16901694#endif
     1695#ifdef VBOX_WITH_VIDEOHWACCEL
     1696            case VBoxDefs::VHWACommandProcessType:
     1697            {
     1698                VBoxVHWACommandProcessEvent *cmde = (VBoxVHWACommandProcessEvent *)e;
     1699                handleVHWACommand(cmde->command());
     1700                return true;
     1701            }
     1702#endif
    16911703            default:
    16921704                break;
     
    16961708    return QAbstractScrollArea::event (e);
    16971709}
     1710
     1711#ifdef VBOX_WITH_VIDEOHWACCEL
     1712void VBoxConsoleView::handleVHWACommand(struct _VBOXVHWACMD *pCmd)
     1713{
     1714    switch(pCmd->enmCmd)
     1715    {
     1716        case VBOXVHWACMD_TYPE_SURF_CREATE:
     1717        {
     1718            VBOXVHWACMD_SURF_CREATE * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_CREATE);
     1719            pCmd->rc = VERR_NOT_IMPLEMENTED;
     1720            break;
     1721        } break;
     1722        case VBOXVHWACMD_TYPE_SURF_DESTROY:
     1723        {
     1724            VBOXVHWACMD_SURF_DESTROY * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_DESTROY);
     1725            pCmd->rc = VERR_NOT_IMPLEMENTED;
     1726            break;
     1727        } break;
     1728    }
     1729
     1730    CDisplay display = mConsole.GetDisplay();
     1731    Assert (!display.isNull());
     1732
     1733    display.CompleteVHWACommand((BYTE*)pCmd);
     1734}
     1735#endif
    16981736
    16991737bool VBoxConsoleView::eventFilter (QObject *watched, QEvent *e)
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFrameBuffer.cpp

    r19817 r19844  
    260260}
    261261
     262STDMETHODIMP VBoxFrameBuffer::ProcessVHWACommand(BYTE *pCommand)
     263{
     264#ifdef VBOX_WITH_VIDEOHWACCEL
     265    QApplication::postEvent (mView,
     266                             new VBoxVHWACommandProcessEvent ((struct _VBOXVHWACMD*)pCommand));
     267    return S_OK;
     268#else
     269    return E_NOTIMPL;
     270#endif
     271}
     272
    262273//
    263274// VBoxQImageFrameBuffer class
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