- Timestamp:
- Jan 27, 2014 3:00:45 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 91859
- Location:
- trunk/src/VBox/GuestHost/OpenGL
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_vreg.h
r50095 r50246 111 111 } 112 112 113 DECLINLINE(bool) VBoxRect IsCoveres(const RTRECT *pRect, const RTRECT *pCovered)113 DECLINLINE(bool) VBoxRectCovers(const RTRECT *pRect, const RTRECT *pCovered) 114 114 { 115 115 Assert(pRect); -
trunk/src/VBox/GuestHost/OpenGL/util/vreg.cpp
r50095 r50246 799 799 if (pReg1) 800 800 { 801 if ( !VBoxRectCmp(&pReg1->Rect, pRect2))801 if (VBoxRectCovers(pRect2, &RegRect1)) 802 802 { 803 /* no change , and we can break the iteration here*/803 /* no change */ 804 804 805 805 /* zero up the pReg1 to mark it as intersected (see the code after this inner loop) */ 806 806 pReg1 = NULL; 807 break; 807 808 if (!VBoxRectCmp(pRect2, &RegRect1)) 809 break; /* and we can break the iteration here */ 808 810 } 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 } 820 828 } 821 829 else … … 1007 1015 PVBOXVR_REG pReg1 = PVBOXVR_REG_FROM_ENTRY(pEntry1); 1008 1016 1009 if (VBoxRect IsCoveres(&pReg1->Rect, &aRects[i]))1017 if (VBoxRectCovers(&pReg1->Rect, &aRects[i])) 1010 1018 { 1011 1019 cCovered++;
Note:
See TracChangeset
for help on using the changeset viewer.