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

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

Issue 672673005: Remove IsHighDPIEnabled, move EnableHighDPISupport to only place it's used (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dpi-cleanup-5
Patch Set: rebase-6 Created 6 years, 2 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 | « ui/base/layout.cc ('k') | ui/base/resource/resource_bundle_unittest.cc » ('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 bae01c7b3ea4fddbe9892e170b5eeaec6f5887ca..c522e58b969fa6ce7db72d53aa7e6c5d34e09bb8 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -629,14 +629,12 @@ void ResourceBundle::InitSharedInstance(Delegate* delegate) {
supported_scale_factors.push_back(SCALE_FACTOR_200P);
#elif defined(OS_WIN)
bool default_to_100P = true;
- if (gfx::IsHighDPIEnabled()) {
- // On Windows if the dpi scale is greater than 1.25 on high dpi machines
- // downscaling from 200 percent looks better than scaling up from 100
- // percent.
- if (gfx::GetDPIScale() > 1.25) {
- supported_scale_factors.push_back(SCALE_FACTOR_200P);
- default_to_100P = false;
- }
+ // On Windows if the dpi scale is greater than 1.25 on high dpi machines
+ // downscaling from 200 percent looks better than scaling up from 100
+ // percent.
+ if (gfx::GetDPIScale() > 1.25) {
+ supported_scale_factors.push_back(SCALE_FACTOR_200P);
+ default_to_100P = false;
}
if (default_to_100P)
supported_scale_factors.push_back(SCALE_FACTOR_100P);
@@ -645,10 +643,7 @@ void ResourceBundle::InitSharedInstance(Delegate* delegate) {
#if defined(OS_WIN)
// Must be called _after_ supported scale factors are set since it
// uses them.
- // Don't initialize the device scale factor if it has already been
- // initialized.
- if (!gfx::win::IsDeviceScaleFactorSet())
- gfx::InitDeviceScaleFactor(gfx::GetDPIScale());
+ gfx::InitDeviceScaleFactor(gfx::GetDPIScale());
#endif
}
« no previous file with comments | « ui/base/layout.cc ('k') | ui/base/resource/resource_bundle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698