儲存庫 vbox 的更動 50161
- 時間撮記:
- 2014-1-22 下午03:48:59 (11 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp
r50149 r50161 188 188 return VERR_INVALID_STATE; 189 189 } 190 191 if (pScreen->u16Flags & VBVA_SCREEN_F_DISABLED) 192 { 193 CrVrScrCompositorClear(&pFb->Compositor); 194 } 195 190 196 RTRECT Rect; 191 197 Rect.xLeft = 0; … … 205 211 if (pFb->pDisplay) 206 212 pFb->pDisplay->FramebufferChanged(pFb); 213 207 214 return VINF_SUCCESS; 208 215 } … … 1859 1866 if (pViewportRect->xLeft != mViewportRect.xLeft || pViewportRect->yTop != mViewportRect.yTop) 1860 1867 { 1861 const RTRECT* pRect = CrVrScrCompositorRectGet(getCompositor());1868 const RTRECT* pRect = getRect(); 1862 1869 int rc = mpWindow->SetPosition(pRect->xLeft - mViewportRect.xLeft, pRect->yTop - mViewportRect.yTop); 1863 1870 if (!RT_SUCCESS(rc)) … … 1938 1945 } 1939 1946 1940 const RTRECT* pRect = CrVrScrCompositorRectGet(getCompositor()); 1941 int rc = mpWindow->SetPosition(pRect->xLeft - mViewportRect.xLeft, pRect->yTop - mViewportRect.yTop); 1942 if (!RT_SUCCESS(rc)) 1943 { 1944 WARN(("SetComposition failed rc %d", rc)); 1945 return rc; 1946 } 1947 1948 setRegionsChanged(); 1949 1950 return mpWindow->SetSize((uint32_t)(pRect->xRight - pRect->xLeft), (uint32_t)(pRect->yBottom - pRect->yTop)); 1947 if (CrFbIsEnabled(getFramebuffer())) 1948 { 1949 const RTRECT* pRect = getRect(); 1950 int rc = mpWindow->SetPosition(pRect->xLeft - mViewportRect.xLeft, pRect->yTop - mViewportRect.yTop); 1951 if (!RT_SUCCESS(rc)) 1952 { 1953 WARN(("SetComposition failed rc %d", rc)); 1954 return rc; 1955 } 1956 1957 setRegionsChanged(); 1958 1959 return mpWindow->SetSize((uint32_t)(pRect->xRight - pRect->xLeft), (uint32_t)(pRect->yBottom - pRect->yTop)); 1960 } 1961 1962 return mpWindow->SetVisible(false); 1963 } 1964 1965 virtual int windowSetCompositor(bool fSet) 1966 { 1967 if (fSet) 1968 { 1969 const struct VBOXVR_SCR_COMPOSITOR* pCompositor = CrFbGetCompositor(getFramebuffer()); 1970 return mpWindow->SetCompositor(pCompositor); 1971 } 1972 return mpWindow->SetCompositor(NULL); 1951 1973 } 1952 1974 … … 1968 1990 } 1969 1991 1970 rc = mpWindow->SetCompositor(NULL);1992 rc = windowSetCompositor(false); 1971 1993 if (!RT_SUCCESS(rc)) 1972 1994 { … … 1994 2016 virtual int windowSync() 1995 2017 { 1996 const struct VBOXVR_SCR_COMPOSITOR* pCompositor = getCompositor(); 1997 const RTRECT* pRect = CrVrScrCompositorRectGet(pCompositor); 2018 const RTRECT* pRect = getRect(); 1998 2019 1999 2020 int rc = mpWindow->UpdateBegin(); … … 2004 2025 } 2005 2026 2006 rc = mpWindow->SetCompositor(pCompositor);2027 rc = windowSetCompositor(true); 2007 2028 if (!RT_SUCCESS(rc)) 2008 2029 { … … 2053 2074 } 2054 2075 2055 virtual const struct VBOXVR_SCR_COMPOSITOR* getCompositor() 2056 { 2057 return CrFbGetCompositor(getFramebuffer()); 2076 virtual const struct RTRECT* getRect() 2077 { 2078 const struct VBOXVR_SCR_COMPOSITOR* pCompositor = CrFbGetCompositor(getFramebuffer()); 2079 return CrVrScrCompositorRectGet(pCompositor); 2058 2080 } 2059 2081 … … 2195 2217 } 2196 2218 2197 rc = s ynchCompositorData();2219 rc = setRegionsChanged(); 2198 2220 if (!RT_SUCCESS(rc)) 2199 2221 { … … 2206 2228 2207 2229 protected: 2230 virtual int windowSetCompositor(bool fSet) 2231 { 2232 if (fSet) 2233 return getWindow()->SetCompositor(&mCompositor); 2234 return getWindow()->SetCompositor(NULL); 2235 } 2236 2208 2237 virtual void ueRegions() 2209 2238 { … … 2211 2240 } 2212 2241 2242 int compositorMarkUpdated() 2243 { 2244 CrVrScrCompositorClear(&mCompositor); 2245 int rc = CrVrScrCompositorRectSet(&mCompositor, CrVrScrCompositorRectGet(CrFbGetCompositor(getFramebuffer())), NULL); 2246 if (!RT_SUCCESS(rc)) 2247 { 2248 WARN(("err")); 2249 return rc; 2250 } 2251 2252 rc = setRegionsChanged(); 2253 if (!RT_SUCCESS(rc)) 2254 { 2255 WARN(("screenChanged failed %d", rc)); 2256 return rc; 2257 } 2258 2259 return VINF_SUCCESS; 2260 } 2261 2213 2262 virtual int screenChanged() 2214 2263 { 2215 int rc = CrFbDisplayWindow::screenChanged(); 2264 int rc = compositorMarkUpdated(); 2265 if (!RT_SUCCESS(rc)) 2266 { 2267 WARN(("err")); 2268 return rc; 2269 } 2270 2271 rc = CrFbDisplayWindow::screenChanged(); 2216 2272 if (!RT_SUCCESS(rc)) 2217 2273 { … … 2220 2276 } 2221 2277 2222 rc = synchCompositorData(); 2223 if (!RT_SUCCESS(rc)) 2224 { 2225 WARN(("err")); 2226 return rc; 2227 } 2228 2229 return VINF_SUCCESS; 2230 } 2231 2232 virtual const struct VBOXVR_SCR_COMPOSITOR* getCompositor() 2233 { 2234 return &mCompositor; 2278 return VINF_SUCCESS; 2279 } 2280 2281 virtual const struct RTRECT* getRect() 2282 { 2283 return CrVrScrCompositorRectGet(&mCompositor); 2235 2284 } 2236 2285 … … 2298 2347 } 2299 2348 2300 int synchCompositorData()2301 {2302 CrVrScrCompositorClear(&mCompositor);2303 2304 const struct VBVAINFOSCREEN* pScreenInfo = CrFbGetScreenInfo(getFramebuffer());2305 mPos.x = pScreenInfo->i32OriginX;2306 mPos.y = pScreenInfo->i32OriginY;2307 2308 int rc = CrVrScrCompositorRectSet(&mCompositor, CrVrScrCompositorRectGet(CrFbGetCompositor(getFramebuffer())), NULL);2309 if (!RT_SUCCESS(rc))2310 {2311 WARN(("CrVrScrCompositorRectSet failed, rc %d", rc));2312 return rc;2313 }2314 rc = synchCompositorRegions();2315 if (!RT_SUCCESS(rc))2316 {2317 WARN(("synchCompositorRegions failed, rc %d", rc));2318 return rc;2319 }2320 2321 return rc;2322 }2323 2324 2349 virtual int synchCompositor() 2325 2350 { 2326 int rc = CrVrScrCompositorRectSet(&mCompositor, CrVrScrCompositorRectGet(CrFbGetCompositor(getFramebuffer())), NULL);2327 if (!RT_SUCCESS(rc)) 2328 { 2329 WARN((" CrVrScrCompositorRectSetfailed, rc %d", rc));2351 int rc = compositorMarkUpdated(); 2352 if (!RT_SUCCESS(rc)) 2353 { 2354 WARN(("compositorMarkUpdated failed, rc %d", rc)); 2330 2355 return rc; 2331 2356 } … … 2335 2360 { 2336 2361 WARN(("fbSynchAddAllEntries failed, rc %d", rc)); 2337 return rc;2338 }2339 2340 rc = synchCompositorRegions();2341 if (!RT_SUCCESS(rc))2342 {2343 WARN(("synchCompositorRegions failed, rc %d", rc));2344 2362 return rc; 2345 2363 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器