VirtualBox

Changeset 45133 in vbox


Ignore:
Timestamp:
Mar 22, 2013 5:51:03 AM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: vreg fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/util/vreg.cpp

    r45132 r45133  
    16541654{
    16551655    bool fChanged;
     1656    CrVrScrCompositorEntryIsInList(pEntry);
    16561657    int rc = VBoxVrCompositorEntryRegionsSet(&pCompositor->Compositor, &pEntry->Ce, cRegions, paRegions, &fChanged);
    16571658    if (!RT_SUCCESS(rc))
     
    16631664    if (fChanged)
    16641665    {
     1666        CrVrScrCompositorEntrySetChanged(pEntry, true);
     1667        if (!CrVrScrCompositorEntryIsInList(pEntry))
     1668        {
     1669            pEntry->cRects = 0;
     1670            pEntry->paSrcRects = NULL;
     1671            pEntry->paDstRects = NULL;
     1672        }
    16651673        crVrScrCompositorRectsInvalidate(pCompositor);
    16661674    }
     
    16751683static int crVrScrCompositorEntryPositionSet(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, const RTPOINT *pPos, bool *pfChanged)
    16761684{
     1685    if (pfChanged)
     1686        *pfChanged = false;
    16771687    if (pEntry && (pEntry->Pos.x != pPos->x || pEntry->Pos.y != pPos->y))
    16781688    {
     
    16911701        pEntry->Pos = *pPos;
    16921702        CrVrScrCompositorEntrySetChanged(pEntry, true);
     1703
     1704        if (pfChanged)
     1705            *pfChanged = true;
    16931706    }
    16941707    return VINF_SUCCESS;
     
    17331746VBOXVREGDECL(int) CrVrScrCompositorEntryRegionsSet(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions, bool *pfChanged)
    17341747{
     1748    /* @todo: the fChanged sate calculation is really rough now, this is enough for now though */
    17351749    bool fChanged = false, fPosChanged = false;
     1750    bool fWasInList = CrVrScrCompositorEntryIsInList(pEntry);
    17361751    int rc = CrVrScrCompositorEntryRemove(pCompositor, pEntry);
    17371752    if (!RT_SUCCESS(rc))
     
    17591774
    17601775    if (pfChanged)
    1761         *pfChanged = fPosChanged || fChanged;
     1776        *pfChanged = fPosChanged || fChanged || fWasInList;
    17621777
    17631778    return VINF_SUCCESS;
     
    19031918        return VINF_SUCCESS;
    19041919
     1920    CrVrScrCompositorEntrySetChanged(pEntry, true);
     1921    pEntry->cRects = 0;
     1922    pEntry->paSrcRects = NULL;
     1923    pEntry->paDstRects = NULL;
     1924
    19051925    crVrScrCompositorRectsInvalidate(pCompositor);
    19061926    return VINF_SUCCESS;
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