forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ozone/wayland] Fixed some issues related to scaling on HiDPI screens.
There are two independent scale factors that were not used properly, which caused incorrect scaling behaviour on HiDPI screens. The first scale factor is property of the window manager (Wayland); it is integral and expected to be used as scale of buffers that back the window surface (see wl_surface_set_buffer_scale). This value is provided by the window manager, and neither user nor browser can affect it directly. I will refer to this value as 'platform scale'. The second scale factor defines how much the browser UI should be scaled. This value is real (floating point), and it can be set via the aforementioned --force-device-scale-factor command line flag. The default base scale is equal to the platform scale, which results in UI that looks more or less the same size as other applications. This scale is set in display::Display, and I will refer to it as 'UI scale'. So here is what this CL fixes. 1. The platform scale had been forwarded to the UI scale with no regard to the forcing flag, which caused issue 910797 (the flag did not have any effect). 2. The platform scale had not been used to scale the backing buffers, which caused the issue 929871 (blurry contents of windows on HDPI screens). 3. The coordinate-aware events (mouse and touch) and window sizing logic were not aware of the buffer scaling. 4. Both parameters had been named 'device scale factors' which was confusing. There are some issues that will be fixed in consequent CLs. The forced device scale factor is not propagated properly through display::Display. For fixing that, https://crbug.com/950313 is filed. Bug: 910797 Change-Id: I51a95e7218306295e3ab1f90d4b088b8bee93951 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1472617 Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Reviewed-by: Ahmed Fakhry <afakhry@chromium.org> Reviewed-by: Bret Sepulveda <bsep@chromium.org> Reviewed-by: Maksim Sisov <msisov@igalia.com> Reviewed-by: Malay Keshav <malaykeshav@chromium.org> Reviewed-by: Dominick Ng <dominickn@chromium.org> Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Commit-Queue: Alexander Dunaev <adunaev@igalia.com> Auto-Submit: Alexander Dunaev <adunaev@igalia.com> Cr-Commit-Position: refs/heads/master@{#656423}
- Loading branch information
1 parent
a1720b5
commit 605d15d
Showing
39 changed files
with
382 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.