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

Unified Diff: ui/base/resource/resource_bundle.cc

Issue 308003020: Pass the device scale factor in the command line to renderer processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed presubmit warnings Created 6 years, 7 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 | « content/public/common/content_switches.cc ('k') | ui/gfx/win/dpi.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 83aba3c0e988dc3a2829ae4cdc3ea7f7cbd52a3e..f5a592d022124b541899548087c1f2d2b5facbad 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -605,7 +605,10 @@ void ResourceBundle::InitSharedInstance(Delegate* delegate) {
#if defined(OS_WIN)
// Must be called _after_ supported scale factors are set since it
// uses them.
- ui::win::InitDeviceScaleFactor();
+ // Don't initialize the device scale factor if it has already been
+ // initialized.
+ if (!gfx::win::IsDeviceScaleFactorSet())
+ ui::win::InitDeviceScaleFactor();
#endif
}
« no previous file with comments | « content/public/common/content_switches.cc ('k') | ui/gfx/win/dpi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698