Changeset 53158 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp
- Timestamp:
- Oct 28, 2014 12:09:57 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp
r53153 r53158 1838 1838 1839 1839 int rc = VINF_SUCCESS; 1840 CR_FBDISPLAY_INFO *pDpInfo; 1841 #if 0 1842 bool fDefaultParentChange = (idScreen == 0); 1843 if (fDefaultParentChange) 1844 { 1845 for (int i = 0; i < cr_server.screenCount; ++i) 1846 { 1847 pDpInfo = &g_CrPresenter.aDisplayInfos[i]; 1848 if (pDpInfo->pDpWin) 1849 { 1850 HCR_FRAMEBUFFER hFb = pDpInfo->iFb >= 0 ? CrPMgrFbGet(pDpInfo->iFb) : NULL; 1851 rc = pDpInfo->pDpWin->UpdateBegin(hFb); 1852 if (RT_SUCCESS(rc)) 1853 { 1854 rc = pDpInfo->pDpWin->setDefaultParent(cr_server.screen[idScreen].winID); 1855 if (RT_FAILURE(rc)) 1856 { 1857 WARN(("setDefaultParent failed %d", rc)); 1858 pDpInfo->pDpWin->UpdateEnd(hFb); 1859 } 1860 } 1861 else 1862 WARN(("UpdateBegin failed %d", rc)); 1863 1864 if (RT_FAILURE(rc)) 1865 { 1866 WARN(("err")); 1867 for (int j = 0; j < i - 1; ++j) 1868 { 1869 pDpInfo = &g_CrPresenter.aDisplayInfos[j]; 1870 if (pDpInfo->pDpWin) 1871 { 1872 HCR_FRAMEBUFFER hFb = pDpInfo->iFb >= 0 ? CrPMgrFbGet(pDpInfo->iFb) : NULL; 1873 pDpInfo->pDpWin->UpdateEnd(hFb); 1874 } 1875 } 1876 1877 Assert(RT_FAILURE(rc)); 1878 return rc; 1879 } 1880 } 1881 } 1882 } 1883 #endif 1884 1885 pDpInfo = &g_CrPresenter.aDisplayInfos[idScreen]; 1886 1887 HCR_FRAMEBUFFER hFb = pDpInfo->iFb >= 0 ? CrPMgrFbGet(pDpInfo->iFb) : NULL; 1840 1841 CR_FBDISPLAY_INFO *pDpInfo = &g_CrPresenter.aDisplayInfos[idScreen]; 1842 HCR_FRAMEBUFFER hFb = pDpInfo->iFb >= 0 ? CrPMgrFbGet(pDpInfo->iFb) : NULL; 1843 1888 1844 if (hFb && CrFbIsUpdating(hFb)) 1889 1845 { 1890 1846 WARN(("trying to update viewport while framebuffer is being updated")); 1891 rc = VERR_INVALID_STATE; 1892 goto end; 1847 return VERR_INVALID_STATE; 1893 1848 } 1894 1849 … … 1901 1856 { 1902 1857 pDpInfo->pDpWin->reparent(cr_server.screen[idScreen].winID); 1903 1904 1858 pDpInfo->pDpWin->UpdateEnd(hFb); 1905 1859 } 1906 else1907 WARN(("UpdateBegin failed %d", rc));1908 1860 } 1909 1861 else … … 1912 1864 { 1913 1865 rc = pDpInfo->pWindow->UpdateBegin(); 1914 if (RT_FAILURE(rc)) 1915 { 1916 WARN(("UpdateBegin failed %d", rc)); 1917 goto end; 1918 } 1919 1920 rc = pDpInfo->pWindow->SetVisible(false); 1921 if (RT_FAILURE(rc)) 1922 { 1923 WARN(("SetVisible failed %d", rc)); 1866 if (RT_SUCCESS(rc)) 1867 { 1868 rc = pDpInfo->pWindow->SetVisible(false); 1869 if (RT_SUCCESS(rc)) 1870 rc = pDpInfo->pWindow->Reparent(cr_server.screen[idScreen].winID); 1871 1924 1872 pDpInfo->pWindow->UpdateEnd(); 1925 goto end; 1926 } 1927 1928 rc = pDpInfo->pWindow->Reparent(cr_server.screen[idScreen].winID); 1929 if (RT_FAILURE(rc)) 1930 { 1931 WARN(("Reparent failed %d", rc)); 1932 pDpInfo->pWindow->UpdateEnd(); 1933 goto end; 1934 } 1935 1936 pDpInfo->pWindow->UpdateEnd(); 1937 } 1938 1939 rc = crPMgrCheckInitWindowDisplays(idScreen); 1940 if (RT_FAILURE(rc)) 1941 { 1942 WARN(("crPMgrFbConnectTargetDisplays failed %d", rc)); 1943 goto end; 1944 } 1945 } 1946 end: 1947 #if 0 1948 if (fDefaultParentChange) 1949 { 1950 for (int i = 0; i < cr_server.screenCount; ++i) 1951 { 1952 pDpInfo = &g_CrPresenter.aDisplayInfos[i]; 1953 if (pDpInfo->pDpWin) 1954 { 1955 HCR_FRAMEBUFFER hFb = pDpInfo->iFb >= 0 ? CrPMgrFbGet(pDpInfo->iFb) : NULL; 1956 pDpInfo->pDpWin->UpdateEnd(hFb); 1957 } 1958 } 1959 } 1960 #endif 1873 } 1874 } 1875 1876 if (RT_SUCCESS(rc)) 1877 rc = crPMgrCheckInitWindowDisplays(idScreen); 1878 } 1879 1880 CRASSERT(!rc); 1881 1961 1882 return rc; 1962 1883 }
Note:
See TracChangeset
for help on using the changeset viewer.