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

Unified Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.cc

Issue 1247813002: Honor --force-device-scale-factor when converting point in gfx::Screen on linux aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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: chrome/browser/ui/libgtk2ui/gtk2_ui.cc
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
index 6f9e94100ee88bd8bdaf49128a54c00bd9f9ee8b..698af9819a8de1db4d89a8be0235847e40b5b6f4 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
@@ -45,6 +45,7 @@
#include "third_party/skia/include/core/SkShader.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
+#include "ui/gfx/display.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image.h"
@@ -1434,6 +1435,8 @@ void Gtk2UI::UpdateDeviceScaleFactor(float device_scale_factor) {
}
float Gtk2UI::GetDeviceScaleFactor() const {
+ if (gfx::Display::HasForceDeviceScaleFactor())
+ return gfx::Display::GetForcedDeviceScaleFactor();
float scale = GetFontDPI() / GetBaseDPI();
// Round to 1 decimal, e.g. to 1.4.
return roundf(scale * 10) / 10;
« 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