vbox的更動 53814 路徑 trunk/src/VBox/HostServices/SharedOpenGL
- 時間撮記:
- 2015-1-15 上午11:00:51 (10 年 以前)
- 位置:
- trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.h
r53262 r53814 215 215 int SetVisibleRegionsChanged(); 216 216 int SetCompositor(const struct VBOXVR_SCR_COMPOSITOR * pCompositor); 217 void SetScaleFactor(GLdouble scaleFactor); 218 GLdouble GetScaleFactor(); 217 219 int UpdateBegin(); 218 220 void UpdateEnd(); … … 250 252 CR_FBWIN_FLAGS mFlags; 251 253 uint64_t mParentId; 254 volatile uint32_t mScaleFactorStorage; 252 255 }; 253 256 -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/window.cpp
r53262 r53814 28 28 mWidth(0), 29 29 mHeight(0), 30 mParentId(parentId) 30 mParentId(parentId), 31 mScaleFactorStorage(1) 31 32 { 32 33 mFlags.Value = 0; … … 128 129 } 129 130 130 LOG(("CrWIN: Size [%d ; %d]", width, height));131 132 131 if (mWidth != width || mHeight != height) 133 132 { 133 GLdouble scaleFactor = GetScaleFactor(); 134 134 135 mFlags.fCompositoEntriesModified = 1; 135 mWidth = width; 136 mHeight = height; 136 mWidth = scaleFactor ? (uint32_t)((GLdouble)width * scaleFactor) : width; 137 mHeight = scaleFactor ? (uint32_t)((GLdouble)height * scaleFactor) : height; 138 139 LOG(("CrWIN: Size [%d ; %d]", width, height)); 140 137 141 if (mSpuWindow) 138 cr_server.head_spu->dispatch_table.WindowSize(mSpuWindow, width, height);142 cr_server.head_spu->dispatch_table.WindowSize(mSpuWindow, mWidth, mHeight); 139 143 } 140 144 … … 193 197 194 198 199 void CrFbWindow::SetScaleFactor(GLdouble scaleFactor) 200 { 201 ASMAtomicWriteU32(&mScaleFactorStorage, (uint32_t)scaleFactor); 202 } 203 204 205 GLdouble CrFbWindow::GetScaleFactor() 206 { 207 return (GLdouble)ASMAtomicReadU32(&mScaleFactorStorage); 208 } 209 210 195 211 int CrFbWindow::UpdateBegin() 196 212 { … … 226 242 if (fPresentNeeded || mFlags.fForcePresentOnReenable) 227 243 { 244 GLdouble scaleFactor = GetScaleFactor(); 245 228 246 mFlags.fForcePresentOnReenable = false; 229 247 if (mpCompositor) 248 { 249 CrVrScrCompositorSetStretching((VBOXVR_SCR_COMPOSITOR *)mpCompositor, scaleFactor, scaleFactor); 230 250 cr_server.head_spu->dispatch_table.VBoxPresentComposition(mSpuWindow, mpCompositor, NULL); 251 } 231 252 else 232 253 { … … 238 259 Rect.yBottom = mHeight; 239 260 CrVrScrCompositorInit(&TmpCompositor, &Rect); 261 CrVrScrCompositorSetStretching((VBOXVR_SCR_COMPOSITOR *)&TmpCompositor, scaleFactor, scaleFactor); 240 262 /* this is a cleanup operation 241 263 * empty compositor is guarantid to be released on VBoxPresentComposition return */
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器