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

Unified Diff: ash/display/display_info.cc

Issue 579053002: Remove "upgrading to 2x DSF for lower UI scale when 2x resoruces are available" option (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 3 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 | « ash/display/display_info.h ('k') | ash/display/display_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_info.cc
diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc
index 6a117b01c9631be2ccfbf2371072e6d8e60810a6..61432f60c14b8b54e7a8c980c4d07dab3bbafbd0 100644
--- a/ash/display/display_info.cc
+++ b/ash/display/display_info.cc
@@ -23,9 +23,6 @@
namespace ash {
namespace {
-// TODO(oshima): This feature is obsolete. Remove this after m38.
-bool allow_upgrade_to_high_dpi = false;
-
bool use_125_dsf_for_ui_scaling = false;
// Check the content of |spec| and fill |bounds| and |device_scale_factor|.
@@ -46,7 +43,7 @@ bool GetDisplayBounds(
return false;
}
-}
+} // namespace
DisplayMode::DisplayMode()
: refresh_rate(0.0f),
@@ -86,9 +83,6 @@ DisplayInfo DisplayInfo::CreateFromSpec(const std::string& spec) {
}
// static
-void DisplayInfo::SetAllowUpgradeToHighDPI(bool enable) {
- allow_upgrade_to_high_dpi = enable;
-}
// static
void DisplayInfo::SetUse125DSFForUIScaling(bool enable) {
@@ -292,26 +286,16 @@ void DisplayInfo::SetBounds(const gfx::Rect& new_bounds_in_native) {
float DisplayInfo::GetEffectiveDeviceScaleFactor() const {
if (use_125_dsf_for_ui_scaling && device_scale_factor_ == 1.25f)
return (configured_ui_scale_ == 0.8f) ? 1.25f : 1.0f;
-
- if (allow_upgrade_to_high_dpi && configured_ui_scale_ < 1.0f &&
- device_scale_factor_ == 1.0f) {
- return 2.0f;
- } else if (device_scale_factor_ == configured_ui_scale_) {
+ if (device_scale_factor_ == configured_ui_scale_)
return 1.0f;
- }
return device_scale_factor_;
}
float DisplayInfo::GetEffectiveUIScale() const {
if (use_125_dsf_for_ui_scaling && device_scale_factor_ == 1.25f)
return (configured_ui_scale_ == 0.8f) ? 1.0f : configured_ui_scale_;
-
- if (allow_upgrade_to_high_dpi && configured_ui_scale_ < 1.0f &&
- device_scale_factor_ == 1.0f) {
- return configured_ui_scale_ * 2.0f;
- } else if (device_scale_factor_ == configured_ui_scale_) {
+ if (device_scale_factor_ == configured_ui_scale_)
return 1.0f;
- }
return configured_ui_scale_;
}
« no previous file with comments | « ash/display/display_info.h ('k') | ash/display/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698