VirtualBox

Changeset 21414 in vbox for trunk


Ignore:
Timestamp:
Jul 8, 2009 9:59:19 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49793
Message:

video hw accel: basis for overlay impl in QGLFramebuffer, bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h

    r21304 r21414  
    494494{
    495495public:
    496     VBoxVHWASurfaceBase(class VBoxVHWAGlContextState *aState, bool aIsYInverted, GLsizei aWidth, GLsizei aHeight,
     496    VBoxVHWASurfaceBase(class VBoxVHWAGlContextState *aState, bool aIsYInverted, const QSize * aSize, const QSize * aTargetSize,
    497497            VBoxVHWAColorFormat & aColorFormat,
    498498            VBoxVHWAColorKey * pSrcBltCKey, VBoxVHWAColorKey * pDstBltCKey,
     
    516516
    517517    void performDisplay();
     518
     519    void setRects(const QRect * aTargRect, const QRect * aSrcRect);
     520    void setTargetRectPosition(const QPoint * aPoint);
    518521
    519522    static ulong calcBytesPerPixel(GLenum format, GLenum type);
     
    564567    bool isFrontBuffer() {return !mIsYInverted; }
    565568
    566     bool isOverlay() { return mIsOverlay; }
     569//    bool isOverlay() { return mIsOverlay; }
    567570
    568571#ifdef VBOX_WITH_VIDEOHWACCEL
     
    573576    void initDisplay();
    574577    void deleteDisplay();
     578    void initDisplay(bool bInverted);
     579    void deleteDisplay(bool bInverted);
     580    GLuint createDisplay(bool bInverted);
    575581    void synchTex(const QRect * aRect);
    576582    void synchTexMem(const QRect * aRect);
     
    580586    void synch(const QRect * aRect);
    581587
    582     void doTex2FB(const QRect * aRect);
    583 
    584     void doSetupModelView(bool bInverted);
    585 
    586     QRect mRect;
    587 
    588     GLuint mDisplay;
    589     bool mDisplayInitialized;
     588//    void doTex2FB(const QRect * aRect);
     589    void doTex2FB(const QRect * pDstRect, const QRect * pSrcRect);
     590
     591    void doSetupMatrix(const QSize * pSize, bool bInverted);
     592
     593    QRect mRect; /* == Inv FB size */
     594    QRect mTexRect; /* texture size */
     595
     596    QRect mSrcRect;
     597    QRect mTargRect; /* == Vis FB size */
     598    QRect mTargSize;
     599
     600    GLuint mYInvertedDisplay;
     601    GLuint mVisibleDisplay;
     602
     603    bool mYInvertedDisplayInitialized;
     604    bool mVisibleDisplayInitialized;
    590605
    591606    uchar * mAddress;
     
    626641    bool mIsYInverted;
    627642
    628     bool mIsOverlay;
     643//    bool mIsOverlay;
    629644
    630645protected:
     
    676691        pCurr->invert();
    677692        pTarg->invert();
    678         if(pTarg->isOverlay())
     693        if(pCurr == mSurfPrimary) /* flip of the primary surface */
     694        {
     695            mSurfPrimary = pTarg;
     696        }
     697        else /* flip of the overlay */
    679698        {
    680699            for (OverlayList::iterator it = mOverlays.begin();
     
    687706            }
    688707        }
    689         else
    690         {
    691             mSurfPrimary = pTarg;
    692         }
    693708    }
    694709
     
    781796{
    782797public:
    783     VBoxVHWASurfaceQGL(class VBoxVHWAGlContextState *aState, GLsizei aWidth, GLsizei aHeight,
     798    VBoxVHWASurfaceQGL(class VBoxVHWAGlContextState *aState, const QSize * aSize, const QSize * aTargetSize,
    784799            VBoxVHWAColorFormat & aColorFormat,
    785800            VBoxVHWAColorKey * pSrcBltCKey, VBoxVHWAColorKey * pDstBltCKey,
     
    787802            class VBoxGLWidget *pWidget,
    788803            bool bInvisibleBuffer) :
    789                 VBoxVHWASurfaceBase(aState, bInvisibleBuffer, aWidth, aHeight,
     804                VBoxVHWASurfaceBase(aState, bInvisibleBuffer, aSize, aTargetSize,
    790805                        aColorFormat,
    791806                        pSrcBltCKey, pDstBltCKey, pSrcOverlayCKey, pDstOverlayCKey),
Note: See TracChangeset for help on using the changeset viewer.

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