diff options
author | miletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-24 03:00:21 +0000 |
---|---|---|
committer | miletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-24 03:00:21 +0000 |
commit | 7355993465b3cc0f0395ce5144c1a824af1346a0 (patch) | |
tree | cdde21b0687136cfccc690b10037db1b9fb2b99d /ash/touch/touch_transformer_controller.h | |
parent | 102b81cdfa43709db2b05af452415ccea48fb92f (diff) | |
download | chromium_src-7355993465b3cc0f0395ce5144c1a824af1346a0.zip chromium_src-7355993465b3cc0f0395ce5144c1a824af1346a0.tar.gz chromium_src-7355993465b3cc0f0395ce5144c1a824af1346a0.tar.bz2 |
Scale touch event radius
Touch event's position resolution could be quite different than the
display's resolution, e.g. the display could be set as 1920x1080
while the touchscreen is reporting touch position range at 32767x32767.
Touch event's radius is reported in the units the same as touch position.
While we are doing touch position scaling, we should also do the same
for touch radius.
BUG=392172, 233245
TEST=touch radius is scaled to be reasonable value for HP 23TM
touch monitor.
Review URL: https://codereview.chromium.org/412553005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285132 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/touch/touch_transformer_controller.h')
-rw-r--r-- | ash/touch/touch_transformer_controller.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ash/touch/touch_transformer_controller.h b/ash/touch/touch_transformer_controller.h index f06be29..8512186 100644 --- a/ash/touch/touch_transformer_controller.h +++ b/ash/touch/touch_transformer_controller.h @@ -34,6 +34,8 @@ class ASH_EXPORT TouchTransformerController TouchTransformerMirrorModePillarboxing); FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest, TouchTransformerExtendedMode); + FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest, + TouchRadiusScale); bool ShouldComputeMirrorModeTouchTransformer( const DisplayInfo& touch_display) const ; @@ -44,6 +46,8 @@ class ASH_EXPORT TouchTransformerController gfx::Transform GetExtendedModeTouchTransformer( const DisplayInfo& touch_display, const gfx::Size& fb_size) const; + double GetTouchResolutionScale(const DisplayInfo& touch_display) const; + // For unittests only. bool force_compute_mirror_mode_touch_transformer_; |