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

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

Issue 2540383002: Updates display manager and display preferences to handle touch calibration data. (Closed)
Patch Set: Merge with ToT Created 4 years 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') | ui/display/manager/managed_display_info_unittest.cc » ('j') | 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 73b33084439428dbd55ff90deaa4618d92457569..1dd52bacf4a9f02dded5dfe38cf92a9beb1c12d9 100644
--- a/ui/display/manager/managed_display_info.cc
+++ b/ui/display/manager/managed_display_info.cc
@@ -87,6 +87,19 @@ TouchCalibrationData::TouchCalibrationData(
: point_pairs(calibration_data.point_pairs),
bounds(calibration_data.bounds) {}
+bool TouchCalibrationData::operator==(TouchCalibrationData other) const {
+ if (bounds != other.bounds)
+ return false;
+ CalibrationPointPairQuad quad_1 = point_pairs;
+ CalibrationPointPairQuad& quad_2 = other.point_pairs;
+
+ // Make sure the point pairs are in the correct order.
+ std::sort(quad_1.begin(), quad_1.end(), CalibrationPointPairCompare);
+ std::sort(quad_2.begin(), quad_2.end(), CalibrationPointPairCompare);
+
+ return quad_1 == quad_2;
+}
+
ManagedDisplayMode::ManagedDisplayMode()
: refresh_rate_(0.0f),
is_interlaced_(false),
« no previous file with comments | « ui/display/manager/managed_display_info.h ('k') | ui/display/manager/managed_display_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698