Changeset 50149 in vbox for trunk/src/VBox/HostServices/SharedOpenGL
- Timestamp:
- Jan 21, 2014 6:18:36 PM (11 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp
r50095 r50149 1188 1188 for (int i = 0; i < SHCRGL_CPARMS_DEV_RESIZE; ++i) 1189 1189 { 1190 if (paParms[i].type != VBOX_HGCM_SVC_PARM_PTR 1191 || !paParms[i].u.pointer.addr) 1190 if (paParms[i].type != VBOX_HGCM_SVC_PARM_32BIT) 1192 1191 { 1193 1192 AssertMsgFailed(("invalid param\n")); … … 1196 1195 } 1197 1196 1198 rc = crVBoxServerNotifyResize( (const VBVAINFOSCREEN *)paParms[0].u.pointer.addr, paParms[1].u.pointer.addr);1197 rc = crVBoxServerNotifyResize(paParms[0].u.uint32); 1199 1198 break; 1200 1199 } -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp
r50123 r50149 395 395 } 396 396 397 DECLEXPORT(int) crVBoxServerNotifyResize(const struct VBVAINFOSCREEN *pScreen, void *pvVRAM) 397 398 static int crVBoxServerResizeScreen(const struct VBVAINFOSCREEN *pScreen, void *pvVRAM) 398 399 { 399 400 int rc; … … 427 428 428 429 return rc; 430 } 431 432 DECLEXPORT(int) crVBoxServerNotifyResize(uint32_t idScreen) 433 { 434 struct VBVAINFOSCREEN Screen; 435 void *pvVRAM; 436 437 int rc = cr_server.CltInfo.pfnDmGet(cr_server.CltInfo.hClient, idScreen, &Screen, &pvVRAM); 438 if (!RT_SUCCESS(rc)) 439 { 440 WARN(("err")); 441 return rc; 442 } 443 444 rc = crVBoxServerResizeScreen(&Screen, pvVRAM); 445 if (!RT_SUCCESS(rc)) 446 { 447 WARN(("err")); 448 return rc; 449 } 450 451 return VINF_SUCCESS; 429 452 } 430 453 -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp
r50137 r50149 670 670 Assert(!pReplacedScrEntry); 671 671 } 672 673 if (hEntry) 674 { 675 if (CrVrScrCompositorEntryIsUsed(&hEntry->Entry)) 676 { 677 if (pFb->pDisplay) 678 pFb->pDisplay->EntryTexChanged(pFb, hEntry); 679 } 680 } 672 681 } 673 682 else … … 727 736 pFb->pDisplay->RegionsChanged(pFb); 728 737 } 738 739 if (hEntry) 740 { 741 if (CrVrScrCompositorEntryIsUsed(&hEntry->Entry)) 742 { 743 if (pFb->pDisplay) 744 pFb->pDisplay->EntryTexChanged(pFb, hEntry); 745 } 746 } 729 747 } 730 748 else … … 763 781 return CrHTableGet(&hEntry->HTable, hSlot); 764 782 } 783 784 typedef union CR_FBDISPBASE_FLAGS 785 { 786 struct { 787 uint32_t fRegionsShanged : 1; 788 uint32_t Reserved : 31; 789 }; 790 uint32_t u32Value; 791 } CR_FBDISPBASE_FLAGS; 765 792 766 793 class CrFbDisplayBase : public ICrFbDisplay … … 772 799 mcUpdates(0), 773 800 mhSlot(CRHTABLE_HANDLE_INVALID) 774 {} 801 { 802 mFlags.u32Value = 0; 803 } 775 804 776 805 virtual bool isComposite() … … 792 821 { 793 822 return !!mcUpdates; 823 } 824 825 int setRegionsChanged() 826 { 827 if (!mcUpdates) 828 { 829 WARN(("err")); 830 return VERR_INVALID_STATE; 831 } 832 833 mFlags.fRegionsShanged = 1; 834 return VINF_SUCCESS; 794 835 } 795 836 … … 848 889 { 849 890 ++mcUpdates; 891 Assert(!mFlags.fRegionsShanged || mcUpdates > 1); 850 892 return VINF_SUCCESS; 851 893 } … … 855 897 --mcUpdates; 856 898 Assert(mcUpdates < UINT32_MAX/2); 899 if (!mcUpdates) 900 onUpdateEnd(); 857 901 } 858 902 … … 874 918 return VERR_INVALID_STATE; 875 919 } 920 mFlags.fRegionsShanged = 1; 876 921 return VINF_SUCCESS; 877 922 } … … 904 949 return VERR_INVALID_STATE; 905 950 } 951 mFlags.fRegionsShanged = 1; 906 952 return VINF_SUCCESS; 907 953 } … … 919 965 return VERR_INVALID_STATE; 920 966 } 967 mFlags.fRegionsShanged = 1; 921 968 return VINF_SUCCESS; 922 969 } … … 929 976 return VERR_INVALID_STATE; 930 977 } 978 mFlags.fRegionsShanged = 1; 931 979 return VINF_SUCCESS; 932 980 } … … 948 996 class CrFbDisplayComposite* mpContainer; 949 997 protected: 998 virtual void onUpdateEnd() 999 { 1000 if (mFlags.fRegionsShanged) 1001 { 1002 mFlags.fRegionsShanged = 0; 1003 ueRegions(); 1004 } 1005 } 1006 1007 virtual void ueRegions() 1008 { 1009 } 1010 950 1011 int fbSynchAddAllEntries() 951 1012 { … … 1052 1113 uint32_t mcUpdates; 1053 1114 CRHTABLE_HANDLE mhSlot; 1115 CR_FBDISPBASE_FLAGS mFlags; 1054 1116 }; 1055 1117 … … 1687 1749 virtual int UpdateBegin(struct CR_FRAMEBUFFER *pFb) 1688 1750 { 1689 int rc = CrFbDisplayBase::UpdateBegin(pFb); 1690 if (!RT_SUCCESS(rc)) 1691 { 1692 WARN(("err")); 1693 return rc; 1694 } 1695 1696 return mpWindow->UpdateBegin(); 1751 int rc = mpWindow->UpdateBegin(); 1752 if (RT_SUCCESS(rc)) 1753 { 1754 rc = CrFbDisplayBase::UpdateBegin(pFb); 1755 if (RT_SUCCESS(rc)) 1756 return VINF_SUCCESS; 1757 else 1758 WARN(("err")); 1759 } 1760 else 1761 WARN(("err")); 1762 1763 return rc; 1697 1764 } 1698 1765 1699 1766 virtual void UpdateEnd(struct CR_FRAMEBUFFER *pFb) 1700 1767 { 1768 CrFbDisplayBase::UpdateEnd(pFb); 1769 1701 1770 mpWindow->UpdateEnd(); 1702 1703 CrFbDisplayBase::UpdateEnd(pFb);1704 1771 } 1705 1772 … … 1768 1835 1769 1836 return VINF_SUCCESS; 1770 }1771 1772 virtual int EntryRemoved(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)1773 {1774 int rc = CrFbDisplayBase::EntryRemoved(pFb, hEntry);1775 if (!RT_SUCCESS(rc))1776 {1777 WARN(("err"));1778 return rc;1779 }1780 1781 return mpWindow->SetVisibleRegionsChanged();1782 }1783 1784 virtual int EntryPosChanged(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)1785 {1786 int rc = CrFbDisplayBase::EntryPosChanged(pFb, hEntry);1787 if (!RT_SUCCESS(rc))1788 {1789 WARN(("err"));1790 return rc;1791 }1792 1793 return mpWindow->SetVisibleRegionsChanged();1794 }1795 1796 virtual int RegionsChanged(struct CR_FRAMEBUFFER *pFb)1797 {1798 int rc = CrFbDisplayBase::RegionsChanged(pFb);1799 if (!RT_SUCCESS(rc))1800 {1801 WARN(("err"));1802 return rc;1803 }1804 1805 return mpWindow->SetVisibleRegionsChanged();1806 1837 } 1807 1838 … … 1894 1925 1895 1926 protected: 1927 virtual void ueRegions() 1928 { 1929 mpWindow->SetVisibleRegionsChanged(); 1930 } 1931 1896 1932 virtual int screenChanged() 1897 1933 { … … 1910 1946 } 1911 1947 1912 mpWindow->SetVisibleRegionsChanged();1948 setRegionsChanged(); 1913 1949 1914 1950 return mpWindow->SetSize((uint32_t)(pRect->xRight - pRect->xLeft), (uint32_t)(pRect->yBottom - pRect->yTop)); … … 2122 2158 } 2123 2159 2160 VBOXVR_SCR_COMPOSITOR_ENTRY *pMyEntry = (VBOXVR_SCR_COMPOSITOR_ENTRY*)CrFbDDataEntryGet(hEntry, slotGet()); 2161 rc = CrVrScrCompositorEntryRegionsSet(&mCompositor, pMyEntry, NULL, 0, NULL, false, NULL); 2162 if (!RT_SUCCESS(rc)) 2163 { 2164 WARN(("err")); 2165 return rc; 2166 } 2167 2124 2168 return VINF_SUCCESS; 2125 2169 } … … 2142 2186 } 2143 2187 2144 virtual int RegionsChanged(struct CR_FRAMEBUFFER *pFb)2145 {2146 int rc = CrFbDisplayWindow::RegionsChanged(pFb);2147 if (!RT_SUCCESS(rc))2148 {2149 WARN(("err"));2150 return rc;2151 }2152 2153 rc = synchCompositorRegions();2154 if (!RT_SUCCESS(rc))2155 {2156 WARN(("err"));2157 return rc;2158 }2159 2160 return VINF_SUCCESS;2161 }2162 2163 2188 virtual int setViewportRect(const RTRECT *pViewportRect) 2164 2189 { … … 2181 2206 2182 2207 protected: 2208 virtual void ueRegions() 2209 { 2210 synchCompositorRegions(); 2211 } 2212 2183 2213 virtual int screenChanged() 2184 2214 { … … 2198 2228 2199 2229 return VINF_SUCCESS; 2230 } 2231 2232 virtual const struct VBOXVR_SCR_COMPOSITOR* getCompositor() 2233 { 2234 return &mCompositor; 2200 2235 } 2201 2236 … … 2630 2665 vrdpGeometry(hEntry); 2631 2666 vrdpRegions(hFb, hEntry); 2632 vrdpFrame(hEntry);2667 //vrdpFrame(hEntry); 2633 2668 return VINF_SUCCESS; 2634 2669 }
Note:
See TracChangeset
for help on using the changeset viewer.