Changeset 22795 in vbox
- Timestamp:
- Sep 5, 2009 9:11:47 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h
r22794 r22795 1440 1440 void vboxShowOverlay(bool show); 1441 1441 void vboxUpdateOverlayPosition(const QPoint & pos); 1442 void vboxUpdateOverlay(const Q Point & pos, const QRect & rect, bool show);1442 void vboxUpdateOverlay(const QRect & rect, bool show); 1443 1443 VBoxGLWidget *mpOverlayWidget; 1444 1444 bool mGlOn; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBQGL.cpp
r22794 r22795 2679 2679 vsy2 = sy2 + int(dy2*stretchY); 2680 2680 mVisibleSrcRect.setCoords(vsx1, vsy1, vsx2, vsy2); 2681 Assert(!mVisibleSrcRect.isEmpty()); 2681 2682 Assert(mSrcRect.contains(mVisibleSrcRect)); 2682 2683 } … … 2777 2778 if(bInvokeMultiTex2) 2778 2779 { 2779 doMultiTex2FB(&m TargRect, pPrimary->mpTex[0], &mSrcRect,2780 doMultiTex2FB(&mVisibleTargRect, pPrimary->mpTex[0], &mVisibleSrcRect, 2780 2781 (fourcc() == FOURCC_YV12) ? 3 : 1); 2781 2782 } … … 2784 2785 if(fourcc() == FOURCC_YV12) 2785 2786 { 2786 doMultiTex2FB(&m TargRect, &mSrcRect, 3 );2787 doMultiTex2FB(&mVisibleTargRect, &mVisibleSrcRect, 3 ); 2787 2788 } 2788 2789 else 2789 2790 { 2790 VBOXQGLLOG_QRECT("m TargRect: ", &mTargRect, "\n");2791 VBOXQGLLOG_QRECT("m SrcRect: ", &mSrcRect, "\n");2792 doTex2FB(&m TargRect, &mSrcRect);2791 VBOXQGLLOG_QRECT("mVisibleTargRect: ", &mVisibleTargRect, "\n"); 2792 VBOXQGLLOG_QRECT("mVisibleSrcRect: ", &mVisibleSrcRect, "\n"); 2793 doTex2FB(&mVisibleTargRect, &mVisibleSrcRect); 2793 2794 } 2794 2795 } … … 2802 2803 GLuint VBoxVHWASurfaceBase::createDisplay(VBoxVHWASurfaceBase *pPrimary) 2803 2804 { 2805 if(mVisibleTargRect.isEmpty()) 2806 { 2807 Assert(mVisibleSrcRect.isEmpty()); 2808 return 0; 2809 } 2810 Assert(!mVisibleSrcRect.isEmpty()); 2811 /* just for the fallback */ 2812 if(mVisibleSrcRect.isEmpty()) 2813 { 2814 return 0; 2815 } 2816 2804 2817 VBoxVHWAGlProgramVHWA * pProgram = NULL; 2805 2818 const VBoxVHWAColorKey * pSrcCKey = NULL, *pDstCKey = NULL; … … 2835 2848 deleteDisplay(); 2836 2849 2837 2838 { 2839 mVisibleDisplay = createDisplay(pPrimary); 2840 mVisibleDisplayInitialized = true; 2841 } 2850 mVisibleDisplay = createDisplay(pPrimary); 2851 mVisibleDisplayInitialized = true; 2842 2852 } 2843 2853 … … 2860 2870 { 2861 2871 Assert(mVisibleDisplayInitialized); 2862 2863 synchTexMem(&mSrcRect); 2872 if(mVisibleDisplay == 0) 2873 { 2874 /* nothing to display, i.e. the surface is not visible, 2875 * in the sense that it's located behind the viewport ranges */ 2876 Assert(mVisibleSrcRect.isEmpty()); 2877 Assert(mVisibleTargRect.isEmpty()); 2878 return; 2879 } 2880 else 2881 { 2882 Assert(!mVisibleSrcRect.isEmpty()); 2883 Assert(!mVisibleTargRect.isEmpty()); 2884 } 2885 2886 synchTexMem(&mVisibleSrcRect); 2864 2887 if(pPrimary && getActiveDstOverlayCKey(pPrimary)) 2865 2888 { 2866 pPrimary->synchTexMem(&m TargRect);2889 pPrimary->synchTexMem(&mVisibleTargRect); 2867 2890 } 2868 2891 … … 3375 3398 if(pCmd->SurfInfo.surfCaps & VBOXVHWA_SCAPS_OFFSCREENPLAIN) 3376 3399 { 3400 Assert(0); 3377 3401 pCmd->u.out.ErrInfo = 1; 3378 3402 return VINF_SUCCESS; 3379 3403 } 3380 3404 3381 Assert( pCmd->SurfInfo.surfCaps & VBOXVHWA_SCAPS_OFFSCREENPLAIN3382 || pCmd->SurfInfo.surfCaps & VBOXVHWA_SCAPS_OVERLAY);3405 Assert(/*pCmd->SurfInfo.surfCaps & VBOXVHWA_SCAPS_OFFSCREENPLAIN 3406 || */ pCmd->SurfInfo.surfCaps & VBOXVHWA_SCAPS_OVERLAY); 3383 3407 3384 3408 if(pCmd->u.in.bIsDifferentPixelFormat) … … 5351 5375 void VBoxQGLOverlayFrameBuffer::vboxShowOverlay(bool show) 5352 5376 { 5353 /** @todo */ 5354 Assert(0); 5377 mpOverlayWidget->setVisible(show); 5355 5378 } 5356 5379 5357 5380 void VBoxQGLOverlayFrameBuffer::vboxUpdateOverlayPosition(const QPoint & pos) 5358 5381 { 5359 /** @todo */5360 Assert(0); 5361 } 5362 5363 void VBoxQGLOverlayFrameBuffer::vboxUpdateOverlay(const QPoint & pos, const QRect & rect, bool show) 5364 { 5365 /** @todo */5366 Assert(0);5382 mpOverlayWidget->move(pos); 5383 } 5384 5385 void VBoxQGLOverlayFrameBuffer::vboxUpdateOverlay(const QRect & rect, bool show) 5386 { 5387 mpOverlayWidget->move(rect.x(), rect.y()); 5388 mpOverlayWidget->resize(rect.width(), rect.height()); 5389 mpOverlayWidget->setVisible(show); 5367 5390 } 5368 5391 … … 5389 5412 { 5390 5413 QRect overRect = mpOverlayWidget->overlaysRectUnion(); 5391 vboxUpdateOverlay( QPoint(overRect.x(), overRect.y()),overRect, true);5414 vboxUpdateOverlay(overRect, true); 5392 5415 } 5393 5416 } break; … … 5428 5451 { 5429 5452 QRect overRect = mpOverlayWidget->overlaysRectUnion(); 5430 vboxUpdateOverlay( QPoint(overRect.x(), overRect.y()),overRect, true);5453 vboxUpdateOverlay(overRect, true); 5431 5454 } 5432 5455 } break;
Note:
See TracChangeset
for help on using the changeset viewer.