Changeset 45251 in vbox for trunk/src/VBox/GuestHost
- Timestamp:
- Mar 29, 2013 5:23:18 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84635
- Location:
- trunk/src/VBox/GuestHost/OpenGL
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_vreg.h
r45132 r45251 316 316 } 317 317 318 DECLINLINE(void) CrVrScrCompositorEntryTexUpdate(PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, const VBOXVR_TEXTURE *pTex)319 {320 pEntry->Tex = *pTex;321 CrVrScrCompositorEntrySetChanged(pEntry, true);322 }323 324 318 DECLINLINE(const VBOXVR_TEXTURE *) CrVrScrCompositorEntryTexGet(const VBOXVR_SCR_COMPOSITOR_ENTRY *pEntry) 325 319 { … … 337 331 } 338 332 333 VBOXVREGDECL(int) CrVrScrCompositorEntryTexUpdate(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, const VBOXVR_TEXTURE *pTex); 339 334 VBOXVREGDECL(void) CrVrScrCompositorVisit(PVBOXVR_SCR_COMPOSITOR pCompositor, PFNVBOXVRSCRCOMPOSITOR_VISITOR pfnVisitor, void *pvVisitor); 340 335 VBOXVREGDECL(void) CrVrScrCompositorEntrySetAllChanged(PVBOXVR_SCR_COMPOSITOR pCompositor, bool fChanged); -
trunk/src/VBox/GuestHost/OpenGL/util/vreg.cpp
r45133 r45251 1339 1339 else 1340 1340 { 1341 crWarning("VBoxVrCompositorEntryRegionsIntersect failed, rc %d", tmpRc);1341 WARN(("VBoxVrCompositorEntryRegionsIntersect failed, rc %d", tmpRc)); 1342 1342 rc = tmpRc; 1343 1343 } … … 1368 1368 else 1369 1369 { 1370 crWarning("VBoxVrCompositorEntryRegionsIntersect failed, rc %d", tmpRc);1370 WARN(("VBoxVrCompositorEntryRegionsIntersect failed, rc %d", tmpRc)); 1371 1371 rc = tmpRc; 1372 1372 } … … 1493 1493 else 1494 1494 { 1495 crWarning("RTMemAlloc failed!");1495 WARN(("RTMemAlloc failed!")); 1496 1496 RTMemFree(pCompositor->paSrcRects); 1497 1497 pCompositor->paSrcRects = NULL; … … 1500 1500 else 1501 1501 { 1502 crWarning("RTMemAlloc failed!");1502 WARN(("RTMemAlloc failed!")); 1503 1503 pCompositor->paDstRects = NULL; 1504 1504 } … … 1632 1632 if (!RT_SUCCESS(rc)) 1633 1633 { 1634 crWarning("VBoxVrCompositorEntryRegionsAdd failed, rc %d", rc);1634 WARN(("VBoxVrCompositorEntryRegionsAdd failed, rc %d", rc)); 1635 1635 return rc; 1636 1636 } … … 1658 1658 if (!RT_SUCCESS(rc)) 1659 1659 { 1660 crWarning("VBoxVrCompositorEntryRegionsSet failed, rc %d", rc);1660 WARN(("VBoxVrCompositorEntryRegionsSet failed, rc %d", rc)); 1661 1661 return rc; 1662 1662 } … … 1690 1690 if (!RT_SUCCESS(rc)) 1691 1691 { 1692 crWarning("VBoxVrCompositorEntryRegionsTranslate failed rc %d", rc);1692 WARN(("VBoxVrCompositorEntryRegionsTranslate failed rc %d", rc)); 1693 1693 return rc; 1694 1694 } … … 1706 1706 } 1707 1707 return VINF_SUCCESS; 1708 } 1709 1710 static int crVrScrCompositorEntryEnsureRegionsInTex(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry) 1711 { 1712 RTRECT Rect; 1713 Rect.xLeft = pEntry->Pos.x; 1714 Rect.yTop = pEntry->Pos.y; 1715 Rect.xRight = pEntry->Pos.x + pEntry->Tex.width; 1716 Rect.yBottom = pEntry->Pos.y + pEntry->Tex.height; 1717 int rc = CrVrScrCompositorEntryRegionsIntersect(pCompositor, pEntry, 1, &Rect, NULL); 1718 if (!RT_SUCCESS(rc)) 1719 WARN(("CrVrScrCompositorEntryRegionsIntersect failed, rc %d", rc)); 1720 return rc; 1708 1721 } 1709 1722 … … 1718 1731 if (!RT_SUCCESS(rc)) 1719 1732 { 1720 crWarning("RegionsAdd: crVrScrCompositorEntryPositionSet failed rc %d", rc);1733 WARN(("RegionsAdd: crVrScrCompositorEntryPositionSet failed rc %d", rc)); 1721 1734 return rc; 1722 1735 } … … 1726 1739 if (!RT_SUCCESS(rc)) 1727 1740 { 1728 crWarning("crVrScrCompositorEntryRegionsAdd failed, rc %d", rc);1741 WARN(("crVrScrCompositorEntryRegionsAdd failed, rc %d", rc)); 1729 1742 return rc; 1743 } 1744 1745 if ((fPosChanged || (fChangeFlags & VBOXVR_COMPOSITOR_CF_ENTRY_REGIONS_CHANGED)) && pEntry) 1746 { 1747 rc = crVrScrCompositorEntryEnsureRegionsInTex(pCompositor, pEntry); 1748 if (!RT_SUCCESS(rc)) 1749 { 1750 WARN(("crVrScrCompositorEntryEnsureRegionsInTex failed, rc %d", rc)); 1751 return rc; 1752 } 1730 1753 } 1731 1754 … … 1741 1764 } 1742 1765 1766 return VINF_SUCCESS; 1767 } 1768 1769 VBOXVREGDECL(int) CrVrScrCompositorEntryTexUpdate(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, const VBOXVR_TEXTURE *pTex) 1770 { 1771 bool fCompositorChanged = CrVrScrCompositorEntryIsUsed(pEntry) && (pEntry->Tex.width != pTex->width || pEntry->Tex.height != pTex->height); 1772 pEntry->Tex = *pTex; 1773 CrVrScrCompositorEntrySetChanged(pEntry, true); 1774 if (fCompositorChanged) 1775 { 1776 int rc = crVrScrCompositorEntryEnsureRegionsInTex(pCompositor, pEntry); 1777 if (!RT_SUCCESS(rc)) 1778 { 1779 WARN(("crVrScrCompositorEntryEnsureRegionsInTex failed rc %d", rc)); 1780 return rc; 1781 } 1782 } 1743 1783 return VINF_SUCCESS; 1744 1784 } … … 1752 1792 if (!RT_SUCCESS(rc)) 1753 1793 { 1754 crWarning("RegionsSet: CrVrScrCompositorEntryRemove failed rc %d", rc);1794 WARN(("RegionsSet: CrVrScrCompositorEntryRemove failed rc %d", rc)); 1755 1795 return rc; 1756 1796 } … … 1761 1801 if (!RT_SUCCESS(rc)) 1762 1802 { 1763 crWarning("RegionsSet: crVrScrCompositorEntryPositionSet failed rc %d", rc);1803 WARN(("RegionsSet: crVrScrCompositorEntryPositionSet failed rc %d", rc)); 1764 1804 return rc; 1765 1805 } … … 1769 1809 if (!RT_SUCCESS(rc)) 1770 1810 { 1771 crWarning("crVrScrCompositorEntryRegionsSet failed, rc %d", rc);1811 WARN(("crVrScrCompositorEntryRegionsSet failed, rc %d", rc)); 1772 1812 return rc; 1813 } 1814 1815 if (fChanged && CrVrScrCompositorEntryIsUsed(pEntry)) 1816 { 1817 rc = crVrScrCompositorEntryEnsureRegionsInTex(pCompositor, pEntry); 1818 if (!RT_SUCCESS(rc)) 1819 { 1820 WARN(("crVrScrCompositorEntryEnsureRegionsInTex failed, rc %d", rc)); 1821 return rc; 1822 } 1773 1823 } 1774 1824 … … 1785 1835 if (!RT_SUCCESS(rc)) 1786 1836 { 1787 crWarning("RegionsIntersect: VBoxVrCompositorEntryRegionsIntersect failed rc %d", rc);1837 WARN(("RegionsIntersect: VBoxVrCompositorEntryRegionsIntersect failed rc %d", rc)); 1788 1838 return rc; 1789 1839 } … … 1807 1857 if (!RT_SUCCESS(rc)) 1808 1858 { 1809 crWarning("RegionsIntersect: VBoxVrCompositorEntryRegionsIntersect failed rc %d", rc);1859 WARN(("RegionsIntersect: VBoxVrCompositorEntryRegionsIntersect failed rc %d", rc)); 1810 1860 return rc; 1811 1861 } … … 1841 1891 else 1842 1892 { 1843 crWarning("CrVrScrCompositorEntryRegionsIntersect failed, rc %d", tmpRc);1893 WARN(("CrVrScrCompositorEntryRegionsIntersect failed, rc %d", tmpRc)); 1844 1894 rc = tmpRc; 1845 1895 } … … 1870 1920 else 1871 1921 { 1872 crWarning("CrVrScrCompositorEntryRegionsIntersect failed, rc %d", tmpRc);1922 WARN(("CrVrScrCompositorEntryRegionsIntersect failed, rc %d", tmpRc)); 1873 1923 rc = tmpRc; 1874 1924 } … … 1886 1936 if (!RT_SUCCESS(rc)) 1887 1937 { 1888 crWarning("RegionsSet: crVrScrCompositorEntryPositionSet failed rc %d", rc);1938 WARN(("RegionsSet: crVrScrCompositorEntryPositionSet failed rc %d", rc)); 1889 1939 return rc; 1890 1940 } … … 1898 1948 if (!RT_SUCCESS(rc)) 1899 1949 { 1900 crWarning("crVrScrCompositorRectsCheckInit failed, rc %d", rc);1950 WARN(("crVrScrCompositorRectsCheckInit failed, rc %d", rc)); 1901 1951 return rc; 1902 1952 } … … 1940 1990 else 1941 1991 { 1942 crWarning("RTCritSectInit failed rc %d", rc);1992 WARN(("RTCritSectInit failed rc %d", rc)); 1943 1993 } 1944 1994 return rc; … … 1983 2033 if (!RT_SUCCESS(rc)) 1984 2034 { 1985 crWarning("crVrScrCompositorRectsCheckInit failed, rc %d", rc);2035 WARN(("crVrScrCompositorRectsCheckInit failed, rc %d", rc)); 1986 2036 return rc; 1987 2037 }
Note:
See TracChangeset
for help on using the changeset viewer.