mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1247049 - Optimize GetScreenXY by using the new nsDeviceContext method to get desktop scale factor. r=emk
This commit is contained in:
parent
c82081b194
commit
99b34eaefa
@ -5065,9 +5065,7 @@ nsGlobalWindow::GetScreenXY(ErrorResult& aError)
|
|||||||
LayoutDeviceRect screenRectDev =
|
LayoutDeviceRect screenRectDev =
|
||||||
LayoutDevicePixel::FromAppUnits(screenRect, dc->AppUnitsPerDevPixel());
|
LayoutDevicePixel::FromAppUnits(screenRect, dc->AppUnitsPerDevPixel());
|
||||||
|
|
||||||
nsCOMPtr<nsIWidget> widget = GetMainWidget();
|
DesktopToLayoutDeviceScale scale = dc->GetDesktopToDeviceScale();
|
||||||
DesktopToLayoutDeviceScale scale = widget ? widget->GetDesktopToDeviceScale()
|
|
||||||
: DesktopToLayoutDeviceScale(1.0);
|
|
||||||
DesktopRect screenRectDesk = screenRectDev / scale;
|
DesktopRect screenRectDesk = screenRectDev / scale;
|
||||||
|
|
||||||
CSSPoint cssPt =
|
CSSPoint cssPt =
|
||||||
|
Loading…
Reference in New Issue
Block a user