Index: ui/display/manager/managed_display_info.cc |
diff --git a/ui/display/manager/managed_display_info.cc b/ui/display/manager/managed_display_info.cc |
index c1fc55471ddf35ec455e6201824b5e1e0405cf52..02c329635a6fa470092e52d263bfaaf534ad3f2c 100644 |
--- a/ui/display/manager/managed_display_info.cc |
+++ b/ui/display/manager/managed_display_info.cc |
@@ -393,6 +393,12 @@ void ManagedDisplayInfo::SetBounds(const gfx::Rect& new_bounds_in_native) { |
UpdateDisplaySize(); |
} |
+float ManagedDisplayInfo::GetDensityRatio() const { |
+ if (Use125DSFForUIScaling() && device_scale_factor_ == 1.25f) |
+ return 1.0f; |
+ return device_scale_factor_; |
+} |
+ |
float ManagedDisplayInfo::GetEffectiveDeviceScaleFactor() const { |
if (Use125DSFForUIScaling() && device_scale_factor_ == 1.25f) |
return (configured_ui_scale_ == 0.8f) ? 1.25f : 1.0f; |
@@ -504,7 +510,7 @@ bool ManagedDisplayInfo::IsColorProfileAvailable( |
} |
bool ManagedDisplayInfo::Use125DSFForUIScaling() const { |
- return Display::IsInternalDisplayId(id_); |
+ return id_ != kInvalidDisplayId && Display::IsInternalDisplayId(id_); |
oshima
2017/06/23 23:57:14
why this is necessary?
Dominik Laskowski
2017/06/23 23:59:13
So GetDensityRatio does not DCHECK on a default-co
|
} |
void ManagedDisplayInfo::AddInputDevice(int id) { |