VirtualBox

Changeset 50246 in vbox for trunk


Ignore:
Timestamp:
Jan 27, 2014 3:00:45 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
91859
Message:

crOpenGL: bugfixing

Location:
trunk/src/VBox/GuestHost/OpenGL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_vreg.h

    r50095 r50246  
    111111}
    112112
    113 DECLINLINE(bool) VBoxRectIsCoveres(const RTRECT *pRect, const RTRECT *pCovered)
     113DECLINLINE(bool) VBoxRectCovers(const RTRECT *pRect, const RTRECT *pCovered)
    114114{
    115115    Assert(pRect);
  • trunk/src/VBox/GuestHost/OpenGL/util/vreg.cpp

    r50095 r50246  
    799799            if (pReg1)
    800800            {
    801                 if (!VBoxRectCmp(&pReg1->Rect, pRect2))
     801                if (VBoxRectCovers(pRect2, &RegRect1))
    802802                {
    803                     /* no change, and we can break the iteration here */
     803                    /* no change */
    804804
    805805                    /* zero up the pReg1 to mark it as intersected (see the code after this inner loop) */
    806806                    pReg1 = NULL;
    807                     break;
     807
     808                    if (!VBoxRectCmp(pRect2, &RegRect1))
     809                        break; /* and we can break the iteration here */
    808810                }
    809                 /* @todo: this can have false-alarming sometimes if the separated rects will then be joind into the original rect,
    810                  * so far this should not be a problem for VReg clients, so keep it this way for now  */
    811                 fChanged = true;
    812 
    813                 /* re-use the reg entry */
    814                 vboxVrListRegRemove(pList, pReg1);
    815                 VBoxRectIntersect(&pReg1->Rect, pRect2);
    816                 Assert(!VBoxRectIsZero(&pReg1->Rect));
    817 
    818                 vboxVrListRegAddOrder(pList, pMemberEntry, pReg1);
    819                 pReg1 = NULL;
     811                else
     812                {
     813                    /*just to ensure the VBoxRectCovers is true for equal rects */
     814                    Assert(VBoxRectCmp(pRect2, &RegRect1));
     815
     816                    /* @todo: this can have false-alarming sometimes if the separated rects will then be joind into the original rect,
     817                     * so far this should not be a problem for VReg clients, so keep it this way for now  */
     818                    fChanged = true;
     819
     820                    /* re-use the reg entry */
     821                    vboxVrListRegRemove(pList, pReg1);
     822                    VBoxRectIntersect(&pReg1->Rect, pRect2);
     823                    Assert(!VBoxRectIsZero(&pReg1->Rect));
     824
     825                    vboxVrListRegAddOrder(pList, pMemberEntry, pReg1);
     826                    pReg1 = NULL;
     827                }
    820828            }
    821829            else
     
    10071015            PVBOXVR_REG pReg1 = PVBOXVR_REG_FROM_ENTRY(pEntry1);
    10081016
    1009             if (VBoxRectIsCoveres(&pReg1->Rect, &aRects[i]))
     1017            if (VBoxRectCovers(&pReg1->Rect, &aRects[i]))
    10101018            {
    10111019                cCovered++;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette