// 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(
}
// 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.
}
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;
}
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;