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

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: Reverted changes to dpi.cc 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
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..675f0bee798ab41bf1920d054a1e002dd3a771c6 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::GetDeviceScaleFactor())
sky 2014/06/03 20:11:43 Wouldn't this hit the DCHECK?
ananta 2014/06/03 20:43:24 This wouldn't because the scale factor would be in
+ ui::win::InitDeviceScaleFactor();
#endif
}
« content/public/common/content_switches.h ('K') | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698