Changeset 22846 in vbox for trunk/src/VBox/Frontends/VirtualBox/include/VBoxFBOverlay.h
- Timestamp:
- Sep 8, 2009 7:33:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFBOverlay.h
r22836 r22846 431 431 void updatedMem(const QRect * aRect); 432 432 433 void performDisplay(VBoxVHWASurfaceBase *pPrimary);433 bool performDisplay(VBoxVHWASurfaceBase *pPrimary, bool bForce); 434 434 435 435 void setRects(VBoxVHWASurfaceBase *pPrimary, const QRect & aTargRect, const QRect & aSrcRect, const QRect & aVisibleTargRect, bool bForceReinit); … … 583 583 GLuint createDisplay(VBoxVHWASurfaceBase *pPrimary); 584 584 void doDisplay(VBoxVHWASurfaceBase *pPrimary, VBoxVHWAGlProgramVHWA * pProgram, bool bBindDst); 585 voidsynchTexMem(const QRect * aRect);585 bool synchTexMem(const QRect * aRect); 586 586 587 587 int performBlt(const QRect * pDstRect, VBoxVHWASurfaceBase * pSrcSurface, const QRect * pSrcRect, const VBoxVHWAColorKey * pDstCKey, const VBoxVHWAColorKey * pSrcCKey, bool blt); … … 772 772 } 773 773 774 void performDisplay()774 bool performDisplay(bool bForce) 775 775 { 776 776 VBoxVHWASurfaceBase * pPrimary = mPrimary.current(); 777 pPrimary->performDisplay(NULL);777 bForce |= pPrimary->performDisplay(NULL, bForce); 778 778 779 779 for (OverlayList::const_iterator it = mOverlays.begin(); … … 783 783 if(pOverlay) 784 784 { 785 pOverlay->performDisplay(pPrimary);785 bForce |= pOverlay->performDisplay(pPrimary, bForce); 786 786 } 787 787 } 788 return bForce; 788 789 } 789 790 … … 1061 1062 const QRect & vboxViewport() const {return mViewport;} 1062 1063 1063 void performDisplay() { mDisplay.performDisplay(); }1064 bool performDisplay(bool bForce) { return mDisplay.performDisplay(bForce); } 1064 1065 protected: 1065 1066 … … 1073 1074 // else 1074 1075 // { 1075 mDisplay.performDisplay( );1076 mDisplay.performDisplay(true); 1076 1077 // } 1077 1078 } … … 1165 1166 1166 1167 1167 typedef enum1168 {1169 VBOXFBOVERLAY_DONE = 1,1170 VBOXFBOVERLAY_MODIFIED,1171 VBOXFBOVERLAY_UNTOUCHED1172 } VBOXFBOVERLAY_RESUT;1168 //typedef enum 1169 //{ 1170 // VBOXFBOVERLAY_DONE = 1, 1171 // VBOXFBOVERLAY_MODIFIED, 1172 // VBOXFBOVERLAY_UNTOUCHED 1173 //} VBOXFBOVERLAY_RESUT; 1173 1174 1174 1175 class VBoxQGLOverlay … … 1201 1202 } 1202 1203 1203 VBOXFBOVERLAY_RESUT onPaintEvent (const QPaintEvent *pe, QRect *pRect); 1204 // VBOXFBOVERLAY_RESUT onPaintEvent (const QPaintEvent *pe, QRect *pRect); 1205 1204 1206 void onResizeEvent (const class VBoxResizeEvent *re); 1205 1207 void onResizeEventPostprocess (const class VBoxResizeEvent *re); 1206 1208 1207 void viewportResized(QResizeEvent * re)1209 void onViewportResized(QResizeEvent * re) 1208 1210 { 1209 1211 vboxDoCheckUpdateViewport(); … … 1211 1213 } 1212 1214 1213 void viewportScrolled(int dx, int dy)1215 void onViewportScrolled(int dx, int dy) 1214 1216 { 1215 1217 vboxDoCheckUpdateViewport(); … … 1257 1259 #else 1258 1260 makeCurrent(); 1259 mpOverlayWidget->performDisplay( );1261 mpOverlayWidget->performDisplay(false); 1260 1262 mpOverlayWidget->swapBuffers(); 1261 1263 #endif … … 1350 1352 } 1351 1353 1352 void paintEvent (QPaintEvent *pe)1353 {1354 QRect rect;1355 VBOXFBOVERLAY_RESUT res = mOverlay.onPaintEvent(pe, &rect);1356 switch(res)1357 {1358 case VBOXFBOVERLAY_MODIFIED:1359 {1360 QPaintEvent modified(rect);1361 T::paintEvent(&modified);1362 } break;1363 case VBOXFBOVERLAY_UNTOUCHED:1364 T::paintEvent(pe);1365 break;1366 default:1367 break;1368 }1369 }1354 // void paintEvent (QPaintEvent *pe) 1355 // { 1356 // QRect rect; 1357 // VBOXFBOVERLAY_RESUT res = mOverlay.onPaintEvent(pe, &rect); 1358 // switch(res) 1359 // { 1360 // case VBOXFBOVERLAY_MODIFIED: 1361 // { 1362 // QPaintEvent modified(rect); 1363 // T::paintEvent(&modified); 1364 // } break; 1365 // case VBOXFBOVERLAY_UNTOUCHED: 1366 // T::paintEvent(pe); 1367 // break; 1368 // default: 1369 // break; 1370 // } 1371 // } 1370 1372 1371 1373 void resizeEvent (VBoxResizeEvent *re) … … 1378 1380 void viewportResized(QResizeEvent * re) 1379 1381 { 1380 mOverlay. viewportResized(re);1382 mOverlay.onViewportResized(re); 1381 1383 T::viewportResized(re); 1382 1384 } … … 1384 1386 void viewportScrolled(int dx, int dy) 1385 1387 { 1386 mOverlay. viewportScrolled(dx, dy);1388 mOverlay.onViewportScrolled(dx, dy); 1387 1389 T::viewportScrolled(dx, dy); 1388 1390 }
Note:
See TracChangeset
for help on using the changeset viewer.