Changeset 45251 in vbox for trunk/src/VBox
- Timestamp:
- Mar 29, 2013 5:23:18 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84635
- Location:
- trunk/src/VBox
- Files:
-
- 3 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 } -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
r45248 r45251 467 467 /* the compositor lock is not needed actually since we have prevented renderspu from using the compositor */ 468 468 /* CrVrScrCompositorLock(&mural->Compositor); */ 469 rc = CrVrScrCompositorEntryRemove(&mural->Compositor, &mural->CEntry); 470 if (!RT_SUCCESS(rc)) 471 { 472 crWarning("CrVrScrCompositorEntryRemove failed, rc %d", rc); 473 goto end; 474 } 475 CrVrScrCompositorEntryInit(&mural->CEntry, &Tex); 476 /* initially set regions to all visible since this is what some guest assume 477 * and will not post any more visible regions command */ 478 Rect.xLeft = 0; 479 Rect.xRight = width; 480 Rect.yTop = 0; 481 Rect.yBottom = height; 482 rc = CrVrScrCompositorEntryRegionsSet(&mural->Compositor, &mural->CEntry, NULL, 1, &Rect, NULL); 483 if (!RT_SUCCESS(rc)) 484 { 485 crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc); 486 goto end; 487 } 488 /* CrVrScrCompositorUnlock(&mural->Compositor); */ 489 mural->width = width; 490 mural->height = height; 491 492 mural->fDataPresented = GL_FALSE; 493 494 if (cr_server.currentMural == mural) 495 { 496 crStateGetCurrent()->buffer.width = mural->width; 497 crStateGetCurrent()->buffer.height = mural->height; 498 } 499 500 if (mural->fRootVrOn) 501 { 502 rc = CrVrScrCompositorEntryRemove(&mural->RootVrCompositor, &mural->RootVrCEntry); 469 if (!mural->bReceivedRects) 470 { 471 rc = CrVrScrCompositorEntryRemove(&mural->Compositor, &mural->CEntry); 503 472 if (!RT_SUCCESS(rc)) 504 473 { … … 506 475 goto end; 507 476 } 508 CrVrScrCompositorEntryInit(&mural-> RootVrCEntry, &Tex);477 CrVrScrCompositorEntryInit(&mural->CEntry, &Tex); 509 478 /* initially set regions to all visible since this is what some guest assume 510 479 * and will not post any more visible regions command */ … … 513 482 Rect.yTop = 0; 514 483 Rect.yBottom = height; 515 rc = CrVrScrCompositorEntryRegionsSet(&mural->RootVrCompositor, &mural->RootVrCEntry, NULL, 1, &Rect, NULL); 484 rc = CrVrScrCompositorEntryRegionsSet(&mural->Compositor, &mural->CEntry, NULL, 1, &Rect, NULL); 485 if (!RT_SUCCESS(rc)) 486 { 487 crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc); 488 goto end; 489 } 490 } 491 else 492 { 493 rc = CrVrScrCompositorEntryTexUpdate(&mural->Compositor, &mural->CEntry, &Tex); 494 if (!RT_SUCCESS(rc)) 495 { 496 crWarning("CrVrScrCompositorEntryTexUpdate failed, rc %d", rc); 497 goto end; 498 } 499 } 500 501 /* CrVrScrCompositorUnlock(&mural->Compositor); */ 502 mural->width = width; 503 mural->height = height; 504 505 mural->fDataPresented = GL_FALSE; 506 507 if (cr_server.curClient && cr_server.curClient->currentMural == mural) 508 { 509 crStateGetCurrent()->buffer.width = mural->width; 510 crStateGetCurrent()->buffer.height = mural->height; 511 } 512 513 rc = CrVrScrCompositorEntryRegionsGet(&mural->Compositor, &mural->CEntry, &cRects, NULL, &pRects); 514 if (!RT_SUCCESS(rc)) 515 { 516 crWarning("CrVrScrCompositorEntryRegionsGet failed, rc %d", rc); 517 goto end; 518 } 519 520 if (mural->fRootVrOn) 521 { 522 rc = CrVrScrCompositorEntryRemove(&mural->RootVrCompositor, &mural->RootVrCEntry); 523 if (!RT_SUCCESS(rc)) 524 { 525 crWarning("CrVrScrCompositorEntryRemove failed, rc %d", rc); 526 goto end; 527 } 528 CrVrScrCompositorEntryInit(&mural->RootVrCEntry, &Tex); 529 530 rc = CrVrScrCompositorEntryRegionsSet(&mural->RootVrCompositor, &mural->RootVrCEntry, NULL, cRects, pRects, NULL); 516 531 if (!RT_SUCCESS(rc)) 517 532 { … … 537 552 else 538 553 { 539 rc = CrVrScrCompositorEntryRegionsGet(&mural->Compositor, &mural->CEntry, &cRects, NULL, &pRects);540 if (!RT_SUCCESS(rc))541 {542 crWarning("CrVrScrCompositorEntryRegionsGet failed, rc %d", rc);543 goto end;544 }545 554 } 546 555
Note:
See TracChangeset
for help on using the changeset viewer.