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

Unified Diff: ash/touch/touch_transformer_controller.h

Issue 688183002: Refactor TouchTransformerConverter to allow support for Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mv-touch-transformer
Patch Set: Rebased Created 6 years, 2 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 | « ash/shell.cc ('k') | ash/touch/touch_transformer_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/touch/touch_transformer_controller.h
diff --git a/ash/touch/touch_transformer_controller.h b/ash/touch/touch_transformer_controller.h
index 66a0b380095a098909eb448dcb23db3527f447ba..b210c04fba7c09953fdfc77f38610de00870f138 100644
--- a/ash/touch/touch_transformer_controller.h
+++ b/ash/touch/touch_transformer_controller.h
@@ -41,14 +41,19 @@ class ASH_EXPORT TouchTransformerController
FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest,
TouchRadiusScale);
- bool ShouldComputeMirrorModeTouchTransformer(
- const DisplayInfo& touch_display) const ;
-
- gfx::Transform GetMirrorModeTouchTransformer(
- const DisplayInfo& touch_display) const;
-
- gfx::Transform GetExtendedModeTouchTransformer(
- const DisplayInfo& touch_display, const gfx::Size& fb_size) const;
+ // Returns a transform that will be used to change an event's location from
+ // the touchscreen's coordinate system into the display's coordinate system.
+ // The transform is also responsible for properly scaling the display if the
+ // display support panel fitting.
+ //
+ // On X11 events are reported in framebuffer coordinate space, so the
+ // |framebuffer_size| is used for scaling.
+ // On Ozone events are reported in the touchscreen's resolution, so
+ // |touchscreen| is used to determine the size and scale the event.
+ gfx::Transform GetTouchTransform(
+ const DisplayInfo& display,
+ const ui::TouchscreenDevice& touchscreen,
+ const gfx::Size& framebuffer_size) const;
// Returns the scaling factor for the touch radius such that it scales the
// radius from |touch_device|'s coordiante system to the |touch_display|'s
@@ -57,9 +62,6 @@ class ASH_EXPORT TouchTransformerController
const DisplayInfo& touch_display,
const ui::TouchscreenDevice& touch_device) const;
- // For unittests only.
- bool force_compute_mirror_mode_touch_transformer_;
-
DISALLOW_COPY_AND_ASSIGN(TouchTransformerController);
};
« no previous file with comments | « ash/shell.cc ('k') | ash/touch/touch_transformer_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698