VirtualBox

Changeset 51436 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
May 28, 2014 9:12:15 AM (11 years ago)
Author:
vboxsync
Message:

Main,Frontends: IDisplay provides the guest screen bitmap to frontends.

Location:
trunk/src/VBox/Main/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ConsoleVRDPServer.h

    r49120 r51436  
    197197    int m_mousey;
    198198
    199     IFramebuffer *maFramebuffers[SchemaDefs::MaxGuestMonitors];
     199    ComPtr<IDisplaySourceBitmap> maSourceBitmaps[SchemaDefs::MaxGuestMonitors];
    200200
    201201    ComPtr<IEventListener> mConsoleListener;
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r51141 r51436  
    3232#endif
    3333
     34#include "DisplaySourceBitmapWrap.h"
     35
    3436class Console;
    3537struct VIDEORECCONTEXT;
     
    4951
    5052    ComPtr<IFramebuffer> pFramebuffer;
     53    ComPtr<IDisplaySourceBitmap> pSourceBitmap;
    5154    bool fDisabled;
    5255
     
    219222    STDMETHOD(GetScreenResolution)(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, ULONG *aBitsPerPixel, LONG *aXOrigin, LONG *aYOrigin);
    220223    STDMETHOD(SetFramebuffer)(ULONG aScreenId, IFramebuffer *aFramebuffer);
     224    STDMETHOD(AttachFramebuffer)(ULONG aScreenId,
     225                                 IFramebuffer *aFramebuffer);
     226    STDMETHOD(DetachFramebuffer)(ULONG aScreenId);
     227    STDMETHOD(QueryFramebuffer)(ULONG aScreenId,
     228                                IFramebuffer **aFramebuffer);
    221229    STDMETHOD(GetFramebuffer)(ULONG aScreenId, IFramebuffer **aFramebuffer, LONG *aXOrigin, LONG *aYOrigin);
    222230    STDMETHOD(SetVideoModeHint)(ULONG aDisplay, BOOL aEnabled, BOOL aChangeOrigin, LONG aOriginX, LONG aOriginY, ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel);
     
    232240
    233241    STDMETHOD(ViewportChanged)(ULONG aScreenId, ULONG x, ULONG y, ULONG width, ULONG height);
     242    STDMETHOD(QuerySourceBitmap)(ULONG aScreenId,
     243                                 IDisplaySourceBitmap **aDisplaySourceBitmap);
    234244
    235245    static const PDMDRVREG  DrvReg;
     
    237247private:
    238248
     249    HRESULT querySourceBitmap(ULONG aScreenId,
     250                              IDisplaySourceBitmap **ppDisplaySourceBitmap);
    239251    int updateDisplayData(void);
    240252
     
    423435                   uint8_t fLimitSize);
    424436
     437class ATL_NO_VTABLE DisplaySourceBitmap:
     438    public DisplaySourceBitmapWrap
     439{
     440public:
     441
     442    DECLARE_EMPTY_CTOR_DTOR(DisplaySourceBitmap)
     443
     444    HRESULT FinalConstruct();
     445    void FinalRelease();
     446
     447    /* Public initializer/uninitializer for internal purposes only. */
     448    HRESULT init(ComObjPtr<Display> pDisplay, unsigned uScreenId, DISPLAYFBINFO *pFBInfo);
     449    void uninit();
     450
     451    bool usesVRAM(void) { return m.pu8Allocated == NULL; }
     452
     453private:
     454    // wrapped IDisplaySourceBitmap properties
     455    virtual HRESULT getScreenId(ULONG *aScreenId);
     456
     457    // wrapped IDisplaySourceBitmap methods
     458    virtual HRESULT queryBitmapInfo(BYTE **aAddress,
     459                                    ULONG *aWidth,
     460                                    ULONG *aHeight,
     461                                    ULONG *aBitsPerPixel,
     462                                    ULONG *aBytesPerLine,
     463                                    ULONG *aPixelFormat);
     464
     465    int initSourceBitmap(unsigned aScreenId, DISPLAYFBINFO *pFBInfo);
     466
     467    struct Data
     468    {
     469        ComObjPtr<Display> pDisplay;
     470        unsigned uScreenId;
     471        DISPLAYFBINFO *pFBInfo;
     472
     473        uint8_t *pu8Allocated;
     474
     475        uint8_t *pu8Address;
     476        ULONG ulWidth;
     477        ULONG ulHeight;
     478        ULONG ulBitsPerPixel;
     479        ULONG ulBytesPerLine;
     480        ULONG ulPixelFormat;
     481    };
     482
     483    Data m;
     484};
     485
    425486#endif // ____H_DISPLAYIMPL
    426487/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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