зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1809054 - Cleanup rect usage in FullscreenTransitionInitData. r=rkraesig
Wrote this while digging into bug 1806438. Differential Revision: https://phabricator.services.mozilla.com/D166252
This commit is contained in:
Родитель
12a39b4292
Коммит
dc2ca64ca9
|
@ -3514,7 +3514,7 @@ static LRESULT CALLBACK FullscreenTransitionWindowProc(HWND hWnd, UINT uMsg,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct FullscreenTransitionInitData {
|
struct FullscreenTransitionInitData {
|
||||||
nsIntRect mBounds;
|
LayoutDeviceIntRect mBounds;
|
||||||
HANDLE mSemaphore;
|
HANDLE mSemaphore;
|
||||||
HANDLE mThread;
|
HANDLE mThread;
|
||||||
HWND mWnd;
|
HWND mWnd;
|
||||||
|
@ -3613,14 +3613,11 @@ bool nsWindow::PrepareForFullscreenTransition(nsISupports** aData) {
|
||||||
|
|
||||||
FullscreenTransitionInitData initData;
|
FullscreenTransitionInitData initData;
|
||||||
nsCOMPtr<nsIScreen> screen = GetWidgetScreen();
|
nsCOMPtr<nsIScreen> screen = GetWidgetScreen();
|
||||||
int32_t x, y, width, height;
|
const DesktopIntRect rect = screen->GetRectDisplayPix();
|
||||||
screen->GetRectDisplayPix(&x, &y, &width, &height);
|
|
||||||
MOZ_ASSERT(BoundsUseDesktopPixels(),
|
MOZ_ASSERT(BoundsUseDesktopPixels(),
|
||||||
"Should only be called on top-level window");
|
"Should only be called on top-level window");
|
||||||
double scale = GetDesktopToDeviceScale().scale; // XXX or GetDefaultScale() ?
|
initData.mBounds =
|
||||||
initData.mBounds.SetRect(NSToIntRound(x * scale), NSToIntRound(y * scale),
|
LayoutDeviceIntRect::Round(rect * GetDesktopToDeviceScale());
|
||||||
NSToIntRound(width * scale),
|
|
||||||
NSToIntRound(height * scale));
|
|
||||||
|
|
||||||
// Create a semaphore for synchronizing the window handle which will
|
// Create a semaphore for synchronizing the window handle which will
|
||||||
// be created by the transition thread and used by the main thread for
|
// be created by the transition thread and used by the main thread for
|
||||||
|
|
Загрузка…
Ссылка в новой задаче