VirtualBox

Changeset 22852 in vbox


Ignore:
Timestamp:
Sep 9, 2009 12:09:13 AM (15 years ago)
Author:
vboxsync
Message:

video hw accel: additional overlay update fixes

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

Legend:

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

    r22846 r22852  
    573573
    574574    const VBoxVHWADirtyRect & getDirtyRect() { return mUpdateMem2TexRect; }
    575 
    576575private:
    577576    void doSetRectValuesInternal(const QRect & aTargRect, const QRect & aSrcRect, const QRect & aVisTargRect);
     
    10621061    const QRect & vboxViewport() const {return mViewport;}
    10631062
    1064     bool performDisplay(bool bForce) { return mDisplay.performDisplay(bForce); }
     1063    bool performDisplayAndSwap(bool bForce)
     1064    {
     1065        bForce = mDisplay.performDisplay(bForce | mRepaintNeeded);
     1066        if(bForce)
     1067        {
     1068            swapBuffers();
     1069        }
     1070        return bForce;
     1071    }
    10651072protected:
    10661073
     
    11501157    ulong  mPixelFormat;
    11511158    bool   mUsesGuestVRAM;
     1159
     1160    bool mRepaintNeeded;
     1161
    11521162//    bool   mbVGASurfCreated;
    11531163    QRect mViewport;
     
    12591269#else
    12601270            makeCurrent();
    1261             mpOverlayWidget->performDisplay(false);
    1262             mpOverlayWidget->swapBuffers();
     1271            mpOverlayWidget->performDisplayAndSwap(false);
    12631272#endif
    12641273        }
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp

    r22846 r22852  
    29412941    mPixelFormat(0),
    29422942    mUsesGuestVRAM(false),
     2943    mRepaintNeeded(false),
    29432944//    mbVGASurfCreated(false),
    29442945    mView(aView),
     
    35243525        }
    35253526    }
     3527
     3528    /* just in case we destroy a visible overlay sorface */
     3529    mRepaintNeeded = true;
    35263530
    35273531    void * test = mSurfHandleTable.remove(pCmd->u.in.hSurf);
     
    36193623    pTargSurf->getComplexList()->setCurrentVisible(pTargSurf);
    36203624
     3625    mRepaintNeeded = true;
    36213626#ifdef DEBUG
    36223627    pCurrSurf->cFlipsCurr++;
     
    37943799    }
    37953800
     3801    mRepaintNeeded = true;
     3802
    37963803    return VINF_SUCCESS;
    37973804}
     
    38123819    QPoint pos(pCmd->u.in.xPos, pCmd->u.in.yPos);
    38133820
     3821#ifdef DEBUG_misha
     3822    Assert(pDstSurf == mDisplay.getVGA());
     3823    Assert(mDisplay.getVGA() == mDisplay.getPrimary());
     3824#endif
     3825    if(pSrcSurf->getComplexList()->current() != NULL)
     3826    {
     3827        Assert(pDstSurf);
     3828        if(pDstSurf != mDisplay.getPrimary())
     3829        {
     3830            mDisplay.updateVGA(pDstSurf);
     3831            pDstSurf->getComplexList()->setCurrentVisible(pDstSurf);
     3832        }
     3833    }
     3834
     3835    mRepaintNeeded = true;
     3836
    38143837    for (SurfList::const_iterator it = surfaces.begin();
    38153838             it != surfaces.end(); ++ it)
     
    38293852
    38303853    vboxCheckUpdateAddress (pSurf, pCmd->u.in.offSurface);
     3854
     3855    mRepaintNeeded = true;
    38313856
    38323857//    VBOXVHWA_CKEY_COLORSPACE
     
    54745499            VBOXVHWACMD_SURF_UNLOCK * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_UNLOCK);
    54755500            pCmd->rc = vhwaSurfaceUnlock(pBody);
     5501            /* mNeedOverlayRepaint is set inside the vhwaSurfaceUnlock */
    54765502        } break;
    54775503        case VBOXVHWACMD_TYPE_SURF_BLT:
     
    55155541            VBOXVHWACMD_SURF_COLORKEY_SET * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_COLORKEY_SET);
    55165542            pCmd->rc = mpOverlayWidget->vhwaSurfaceColorkeySet(pBody);
     5543            mNeedOverlayRepaint = true;
    55175544        } break;
    55185545        case VBOXVHWACMD_TYPE_QUERY_INFO1:
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBQGL.cpp

    r22846 r22852  
    130130    }
    131131
    132     pw->performDisplay(true);
    133 
    134     pw->swapBuffers();
     132    pw->performDisplayAndSwap(true);
    135133}
    136134
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