VirtualBox

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


Ignore:
Timestamp:
Aug 13, 2009 12:41:04 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
51016
Message:

video hw accel: basics for saved state support

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r22099 r22215  
    203203VirtualBox_LIBS = $(LIB_DDU)
    204204
     205ifdef VBOX_WITH_VIDEOHWACCEL
     206# Necessary for save state support
     207VirtualBox_LIBS += $(LIB_VMM)
     208endif
    205209ifeq ($(KBUILD_TYPE),release)
    206210 VirtualBox_LDFLAGS.win  += /SUBSYSTEM:windows
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h

    r22189 r22215  
    640640    uint32_t widthCompression() const {return mWidthCompression;}
    641641    uint32_t heightCompression() const {return mHeightCompression;}
    642 //    uint32_t r(uint32_t pix);
    643 //    uint32_t g(uint32_t pix);
    644 //    uint32_t b(uint32_t pix);
     642    const VBoxVHWAColorComponent& r() const {return mR;}
     643    const VBoxVHWAColorComponent& g() const {return mG;}
     644    const VBoxVHWAColorComponent& b() const {return mB;}
     645    const VBoxVHWAColorComponent& a() const {return mA;}
    645646
    646647private:
     
    10331034    VBoxVHWAColorKey mDefaultSrcOverlayCKey;
    10341035
    1035 
    1036 //    GLenum mFormat;
    1037 //    GLint  mInternalFormat;
    1038 //    GLenum mType;
    1039 //    ulong  mDisplayWidth;
    1040 //    ulong  mDisplayHeight;
    1041 //    ulong  mBytesPerPixel;
    1042 //    ulong  mBytesPerLine;
    1043 
    10441036    int mLockCount;
    10451037    /* memory buffer not reflected in fm and texture, e.g if memory buffer is replaced or in case of lock/unlock  */
     
    10781070
    10791071typedef std::list <VBoxVHWASurfaceBase*> SurfList;
     1072typedef std::list <VBoxVHWASurfList*> OverlayList;
    10801073
    10811074class VBoxVHWASurfList
     
    11981191    }
    11991192
    1200 
    12011193    void performDisplay()
    12021194    {
     
    12111203            {
    12121204                pOverlay->performDisplay(pPrimary);
    1213 //                pPrimary->overlay(pOverlay);
    12141205            }
    12151206        }
    12161207    }
     1208
     1209    const OverlayList & overlays() const {return mOverlays;}
    12171210
    12181211private:
     
    12201213    VBoxVHWASurfList mPrimary;
    12211214
    1222     typedef std::list <VBoxVHWASurfList*> OverlayList;
    1223 
    12241215    OverlayList mOverlays;
    12251216};
     
    12351226
    12361227    uchar *vboxAddress() { return mDisplay.getVGA() ? mDisplay.getVGA()->address() : NULL; }
     1228
    12371229#ifdef VBOX_WITH_VIDEOHWACCEL
    12381230    uchar *vboxVRAMAddressFromOffset(uint64_t offset);
    1239 #endif
     1231
     1232    void vhwaSaveExec(struct SSMHANDLE * pSSM);
     1233    int vhwaLoadExec(struct SSMHANDLE * pSSM, uint32_t u32Version);
     1234#endif
     1235
    12401236    ulong vboxBitsPerPixel() { return mDisplay.getVGA()->bitsPerPixel(); }
    12411237    ulong vboxBytesPerLine() { return mDisplay.getVGA() ? mDisplay.getVGA()->bytesPerLine() : NULL; }
    12421238
    12431239typedef void (VBoxGLWidget::*PFNVBOXQGLOP)(void* );
    1244 //typedef FNVBOXQGLOP *PFNVBOXQGLOP;
    12451240
    12461241    void vboxPaintEvent (QPaintEvent *pe) {vboxPerformGLOp(&VBoxGLWidget::vboxDoPaint, pe);}
    12471242    void vboxResizeEvent (VBoxResizeEvent *re) {vboxPerformGLOp(&VBoxGLWidget::vboxDoResize, re);}
    1248 //#ifdef VBOXQGL_DBG_SURF
    1249 //    void vboxTestSurfaces () {vboxPerformGLOp(&VBoxGLWidget::vboxDoTestSurfaces, NULL);}
    1250 //#endif
     1243
    12511244    void vboxProcessVHWACommands(VBoxVHWACommandProcessEvent * pEvent) {vboxPerformGLOp(&VBoxGLWidget::vboxDoProcessVHWACommands, pEvent);}
    12521245#ifdef VBOX_WITH_VIDEOHWACCEL
     
    12591252    void postCmd(VBOXVHWA_PIPECMD_TYPE aType, void * pvData);
    12601253protected:
    1261 //    void resizeGL (int height, int width);
    12621254
    12631255    void paintGL()
    12641256    {
    1265 //        Assert(mState.getCurrent() == NULL);
    1266 //        /* we are called with QGLWidget context */
    1267 //        mState.assertCurrent(mDisplay.getVGA(), false);
    12681257        if(mpfnOp)
    12691258        {
     
    12751264            mDisplay.performDisplay();
    12761265        }
    1277 //        /* restore the context */
    1278 //        mState.makeCurrent(mDisplay.getVGA());
    1279 //        /* clear*/
    1280 //        mState.assertCurrent(NULL, false);
    12811266    }
    12821267
    12831268    void initializeGL();
    12841269private:
    1285 //    void vboxDoInitDisplay();
    1286 //    void vboxDoDeleteDisplay();
    1287 //    void vboxDoPerformDisplay() { Assert(mDisplayInitialized); glCallList(mDisplay); }
    12881270    void vboxDoResize(void *re);
    12891271    void vboxDoPaint(void *rec);
     
    13241306    int vhwaQueryInfo1(struct _VBOXVHWACMD_QUERYINFO1 *pCmd);
    13251307    int vhwaQueryInfo2(struct _VBOXVHWACMD_QUERYINFO2 *pCmd);
     1308    int vhwaConstruct(struct _VBOXVHWACMD_HH_CONSTRUCT *pCmd);
     1309
     1310    int vhwaSaveSurface(struct SSMHANDLE * pSSM, VBoxVHWASurfaceBase *pSurf, uint32_t surfCaps);
     1311    int vhwaLoadSurface(struct SSMHANDLE * pSSM, uint32_t u32Version);
     1312    int vhwaSaveOverlayData(struct SSMHANDLE * pSSM, VBoxVHWASurfaceBase *pSurf);
     1313    int vhwaLoadOverlayData(struct SSMHANDLE * pSSM, uint32_t u32Version);
    13261314
    13271315    void vhwaDoSurfaceOverlayUpdate(VBoxVHWASurfaceBase *pDstSurf, VBoxVHWASurfaceBase *pSrcSurf, struct _VBOXVHWACMD_SURF_OVERLAY_UPDATE *pCmd);
     
    13291317    static const QGLFormat & vboxGLFormat();
    13301318
    1331 //    VBoxVHWASurfaceQGL * pDisplay;
    13321319    VBoxVHWADisplay mDisplay;
    13331320
    13341321
    1335     /* we need to do all opengl stuff in the paintGL context,
    1336      * submit the operation to be performed */
     1322    /* we do all opengl stuff in the paintGL context,
     1323     * submit the operation to be performed
     1324     * @todo: could be moved outside the updateGL */
    13371325    void vboxPerformGLOp(PFNVBOXQGLOP pfn, void* pContext) {mpfnOp = pfn; mOpContext = pContext; updateGL();}
    13381326
     
    13471335    void *mOpContext;
    13481336
    1349 //    ulong  mBitsPerPixel;
    13501337    ulong  mPixelFormat;
    13511338    bool   mUsesGuestVRAM;
    1352 #if 0
    1353     VBoxVHWAGlContextState mState;
    1354 #endif
     1339    bool   mVGASurfCreated;
    13551340
    13561341    RTCRITSECT mCritSect;
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