Index: ui/display/manager/chromeos/touch_transform_controller.cc |
diff --git a/ui/display/manager/chromeos/touch_transform_controller.cc b/ui/display/manager/chromeos/touch_transform_controller.cc |
index f9d28af09a0012a1dcda07e434dfe87b3dab56eb..82f82125f76e73912aa6ab780a55c0fea7b1b79b 100644 |
--- a/ui/display/manager/chromeos/touch_transform_controller.cc |
+++ b/ui/display/manager/chromeos/touch_transform_controller.cc |
@@ -210,6 +210,11 @@ gfx::Transform TouchTransformController::GetTouchTransform( |
} |
#endif |
+ // If the device is currently under calibration, then do not return any |
+ // transform as we want to use the raw native touch input data for calibration |
+ if (is_calibrating_) |
+ return ctm; |
+ |
// If touch calibration data is unavailable, use naive approach. |
if (!touch_display.has_touch_calibration_data()) { |
return GetUncalibratedTransform(ctm, display, touch_display, touch_area, |
@@ -364,4 +369,9 @@ void TouchTransformController::UpdateTouchTransforms() const { |
UpdateTouchTransform(single_display_id, single_display, single_display); |
} |
+void TouchTransformController::SetForCalibration(bool is_calibrating) { |
+ is_calibrating_ = is_calibrating; |
+ UpdateTouchTransforms(); |
+} |
+ |
} // namespace display |