Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(982)

Unified Diff: ui/gfx/screen_mac.mm

Issue 1111543003: Fix --force-device-scale-factor on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/screen_mac.mm
diff --git a/ui/gfx/screen_mac.mm b/ui/gfx/screen_mac.mm
index b5fdeb9c0a6325a118d8426fb65e811084f343bf..3039124e3384ca29f2e1b3ab7f30447304190616 100644
--- a/ui/gfx/screen_mac.mm
+++ b/ui/gfx/screen_mac.mm
@@ -75,6 +75,10 @@ gfx::Display GetDisplayForScreen(NSScreen* screen) {
scale = [screen backingScaleFactor];
else
scale = [screen userSpaceScaleFactor];
+
+ if (gfx::Display::HasForceDeviceScaleFactor())
+ scale = gfx::Display::GetForcedDeviceScaleFactor();
+
display.set_device_scale_factor(scale);
// CGDisplayRotation returns a double. Display::SetRotationAsDegree will
// handle the unexpected situations were the angle is not a multiple of 90.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698