| Index: ash/display/display_info.cc
|
| diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc
|
| index 72d256e47bf36a8ada7a7db0e9baf8519cba0041..f8adf5369ab3ccf2166c594c1c389c3bde03e288 100644
|
| --- a/ash/display/display_info.cc
|
| +++ b/ash/display/display_info.cc
|
| @@ -26,6 +26,8 @@ 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|.
|
| // Returns true when |bounds| is found.
|
| bool GetDisplayBounds(
|
| @@ -89,6 +91,11 @@ void DisplayInfo::SetAllowUpgradeToHighDPI(bool enable) {
|
| }
|
|
|
| // static
|
| +void DisplayInfo::SetUse125DSFForUIScaling(bool enable) {
|
| + use_125_dsf_for_ui_scaling = enable;
|
| +}
|
| +
|
| +// static
|
| DisplayInfo DisplayInfo::CreateFromSpecWithID(const std::string& spec,
|
| int64 id) {
|
| // Default bounds for a display.
|
| @@ -283,6 +290,9 @@ 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;
|
| @@ -293,6 +303,9 @@ float DisplayInfo::GetEffectiveDeviceScaleFactor() const {
|
| }
|
|
|
| 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;
|
|
|