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

Unified Diff: ui/events/touch_ctm.h

Issue 191223007: Move touch CTM from X into Chrome (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: move CTM update code into a separate file ash/touch/touch_ctm_controller.cc Created 6 years, 9 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
Index: ui/events/touch_ctm.h
diff --git a/ui/events/touch_ctm.h b/ui/events/touch_ctm.h
new file mode 100644
index 0000000000000000000000000000000000000000..ba65b6198e7d01bc2d3b48011e494469fe171399
--- /dev/null
+++ b/ui/events/touch_ctm.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_EVENTS_TOUCH_CTM_H_
+#define UI_EVENTS_TOUCH_CTM_H_
+
+#include "ui/events/events_base_export.h"
+
+namespace ui {
+
+// Touch coordinate transformation matrix (CTM) is used to map touch events
+// coordinate from screen space to root window space.
+// When touch events are reported from kernel, its coordinate is in device
+// space. After passing through X, its coordinate gets mapped to screen
+// space, e.g. the framebuffer space that is the combination of multiple
+// display output.
+// In Chrome, we use TouchCTM to remap the touch event's location from
+// the screen space to the root window space if the touch event is targeting
+// that root window.
+class EVENTS_BASE_EXPORT TouchCTM {
sadrul 2014/03/15 19:32:51 Do we need this? Could we use a gfx::Transform ins
Yufeng Shen (Slow to review) 2014/04/29 20:34:18 Looking at Transform::TransformPointInternal() th
+ public:
+ TouchCTM();
+
+ float x_scale;
+ float x_offset;
+ float y_scale;
+ float y_offset;
+};
+
+} // namespace ui
+
+#endif // UI_EVENTS_TOUCH_CTM_H_

Powered by Google App Engine
This is Rietveld 408576698