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

Unified Diff: ui/display/manager/managed_display_info.cc

Issue 2944063002: exo: Fix cursor scaling for 1.25 DSF (Closed)
Patch Set: Fix exo_unittests Created 3 years, 6 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/display/manager/managed_display_info.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « ui/display/manager/managed_display_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698