Changeset 22215 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 13, 2009 12:41:04 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 51016
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r22099 r22215 203 203 VirtualBox_LIBS = $(LIB_DDU) 204 204 205 ifdef VBOX_WITH_VIDEOHWACCEL 206 # Necessary for save state support 207 VirtualBox_LIBS += $(LIB_VMM) 208 endif 205 209 ifeq ($(KBUILD_TYPE),release) 206 210 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h
r22189 r22215 640 640 uint32_t widthCompression() const {return mWidthCompression;} 641 641 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;} 645 646 646 647 private: … … 1033 1034 VBoxVHWAColorKey mDefaultSrcOverlayCKey; 1034 1035 1035 1036 // GLenum mFormat;1037 // GLint mInternalFormat;1038 // GLenum mType;1039 // ulong mDisplayWidth;1040 // ulong mDisplayHeight;1041 // ulong mBytesPerPixel;1042 // ulong mBytesPerLine;1043 1044 1036 int mLockCount; 1045 1037 /* memory buffer not reflected in fm and texture, e.g if memory buffer is replaced or in case of lock/unlock */ … … 1078 1070 1079 1071 typedef std::list <VBoxVHWASurfaceBase*> SurfList; 1072 typedef std::list <VBoxVHWASurfList*> OverlayList; 1080 1073 1081 1074 class VBoxVHWASurfList … … 1198 1191 } 1199 1192 1200 1201 1193 void performDisplay() 1202 1194 { … … 1211 1203 { 1212 1204 pOverlay->performDisplay(pPrimary); 1213 // pPrimary->overlay(pOverlay);1214 1205 } 1215 1206 } 1216 1207 } 1208 1209 const OverlayList & overlays() const {return mOverlays;} 1217 1210 1218 1211 private: … … 1220 1213 VBoxVHWASurfList mPrimary; 1221 1214 1222 typedef std::list <VBoxVHWASurfList*> OverlayList;1223 1224 1215 OverlayList mOverlays; 1225 1216 }; … … 1235 1226 1236 1227 uchar *vboxAddress() { return mDisplay.getVGA() ? mDisplay.getVGA()->address() : NULL; } 1228 1237 1229 #ifdef VBOX_WITH_VIDEOHWACCEL 1238 1230 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 1240 1236 ulong vboxBitsPerPixel() { return mDisplay.getVGA()->bitsPerPixel(); } 1241 1237 ulong vboxBytesPerLine() { return mDisplay.getVGA() ? mDisplay.getVGA()->bytesPerLine() : NULL; } 1242 1238 1243 1239 typedef void (VBoxGLWidget::*PFNVBOXQGLOP)(void* ); 1244 //typedef FNVBOXQGLOP *PFNVBOXQGLOP;1245 1240 1246 1241 void vboxPaintEvent (QPaintEvent *pe) {vboxPerformGLOp(&VBoxGLWidget::vboxDoPaint, pe);} 1247 1242 void vboxResizeEvent (VBoxResizeEvent *re) {vboxPerformGLOp(&VBoxGLWidget::vboxDoResize, re);} 1248 //#ifdef VBOXQGL_DBG_SURF 1249 // void vboxTestSurfaces () {vboxPerformGLOp(&VBoxGLWidget::vboxDoTestSurfaces, NULL);} 1250 //#endif 1243 1251 1244 void vboxProcessVHWACommands(VBoxVHWACommandProcessEvent * pEvent) {vboxPerformGLOp(&VBoxGLWidget::vboxDoProcessVHWACommands, pEvent);} 1252 1245 #ifdef VBOX_WITH_VIDEOHWACCEL … … 1259 1252 void postCmd(VBOXVHWA_PIPECMD_TYPE aType, void * pvData); 1260 1253 protected: 1261 // void resizeGL (int height, int width);1262 1254 1263 1255 void paintGL() 1264 1256 { 1265 // Assert(mState.getCurrent() == NULL);1266 // /* we are called with QGLWidget context */1267 // mState.assertCurrent(mDisplay.getVGA(), false);1268 1257 if(mpfnOp) 1269 1258 { … … 1275 1264 mDisplay.performDisplay(); 1276 1265 } 1277 // /* restore the context */1278 // mState.makeCurrent(mDisplay.getVGA());1279 // /* clear*/1280 // mState.assertCurrent(NULL, false);1281 1266 } 1282 1267 1283 1268 void initializeGL(); 1284 1269 private: 1285 // void vboxDoInitDisplay();1286 // void vboxDoDeleteDisplay();1287 // void vboxDoPerformDisplay() { Assert(mDisplayInitialized); glCallList(mDisplay); }1288 1270 void vboxDoResize(void *re); 1289 1271 void vboxDoPaint(void *rec); … … 1324 1306 int vhwaQueryInfo1(struct _VBOXVHWACMD_QUERYINFO1 *pCmd); 1325 1307 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); 1326 1314 1327 1315 void vhwaDoSurfaceOverlayUpdate(VBoxVHWASurfaceBase *pDstSurf, VBoxVHWASurfaceBase *pSrcSurf, struct _VBOXVHWACMD_SURF_OVERLAY_UPDATE *pCmd); … … 1329 1317 static const QGLFormat & vboxGLFormat(); 1330 1318 1331 // VBoxVHWASurfaceQGL * pDisplay;1332 1319 VBoxVHWADisplay mDisplay; 1333 1320 1334 1321 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 */ 1337 1325 void vboxPerformGLOp(PFNVBOXQGLOP pfn, void* pContext) {mpfnOp = pfn; mOpContext = pContext; updateGL();} 1338 1326 … … 1347 1335 void *mOpContext; 1348 1336 1349 // ulong mBitsPerPixel;1350 1337 ulong mPixelFormat; 1351 1338 bool mUsesGuestVRAM; 1352 #if 0 1353 VBoxVHWAGlContextState mState; 1354 #endif 1339 bool mVGASurfCreated; 1355 1340 1356 1341 RTCRITSECT mCritSect;
Note:
See TracChangeset
for help on using the changeset viewer.