Changeset 53908 in vbox
- Timestamp:
- Jan 22, 2015 6:50:14 AM (10 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp
r53889 r53908 1844 1844 { 1845 1845 bool rc; 1846 crDebug("Set scale factor for initialized display."); 1846 1847 rc = pWin->SetScaleFactor((GLdouble)dScaleFactorW, (GLdouble)dScaleFactorH); 1847 1848 return rc ? 0 : VERR_LOCK_FAILED; 1848 1849 } 1849 1850 else 1850 crDebug("Can't set scale factor bacause overlay window obgect not yet created.");1851 crDebug("Can't apply scale factor at the moment bacause overlay window obgect not yet created. Will be chached."); 1851 1852 } 1852 1853 else 1853 crDebug("Can't set scale factor because specified screen ID cannot be mapped to list of available displays."); 1854 1855 return VERR_INVALID_PARAMETER; 1854 crDebug("Can't apply scale factor at the moment bacause display not yet initialized. Will be chached."); 1855 1856 /* Display output not yet initialized. Let's cache values. */ 1857 pDpInfo->dInitialScaleFactorW = dScaleFactorW; 1858 pDpInfo->dInitialScaleFactorH = dScaleFactorH; 1859 1860 return 0; 1856 1861 } 1857 1862 … … 2106 2111 pDpInfo->pDpWin = pDpInfo->pDpWinRootVr; 2107 2112 pDpInfo->pDpWinRootVr->windowAttach(pDpInfo->pWindow); 2113 2114 /* Set scale factor once it was previously cached when display output was not yet initialized. */ 2115 if (pDpInfo->dInitialScaleFactorW || pDpInfo->dInitialScaleFactorH) 2116 { 2117 crDebug("Set cached scale factor for seamless mode."); 2118 pDpInfo->pWindow->SetScaleFactor((GLdouble)pDpInfo->dInitialScaleFactorW, (GLdouble)pDpInfo->dInitialScaleFactorH); 2119 /* Invalidate cache. */ 2120 pDpInfo->dInitialScaleFactorW = pDpInfo->dInitialScaleFactorH = 0; 2121 } 2108 2122 } 2109 2123 } … … 2129 2143 pDpInfo->pDpWin = new CrFbDisplayWindow(&cr_server.screenVieport[pDpInfo->u32Id].Rect, cr_server.screen[pDpInfo->u32Id].winID); 2130 2144 pDpInfo->pDpWin->windowAttach(pDpInfo->pWindow); 2145 2146 /* Set scale factor once it was previously cached when display output was not yet initialized. */ 2147 if (pDpInfo->dInitialScaleFactorW || pDpInfo->dInitialScaleFactorH) 2148 { 2149 crDebug("Set cached scale factor for host window."); 2150 pDpInfo->pWindow->SetScaleFactor((GLdouble)pDpInfo->dInitialScaleFactorW, (GLdouble)pDpInfo->dInitialScaleFactorH); 2151 /* Invalidate cache. */ 2152 pDpInfo->dInitialScaleFactorW = pDpInfo->dInitialScaleFactorH = 0; 2153 } 2131 2154 } 2132 2155 } -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.h
r53858 r53908 401 401 uint32_t u32Id; 402 402 int32_t iFb; 403 404 /* Cache scaling factor here before display output 405 * initialized (i.e., guest not yet initiated first 3D call). 406 * No synchronization stuff needed here because all the reads 407 * and writes are done in context of 3D HGCM thread. */ 408 double dInitialScaleFactorW; 409 double dInitialScaleFactorH; 403 410 } CR_FBDISPLAY_INFO; 404 411
Note:
See TracChangeset
for help on using the changeset viewer.