Chromium Code Reviews| Index: ui/events/touch_transformer.h |
| diff --git a/ui/events/touch_transformer.h b/ui/events/touch_transformer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1a4785da8c11af04e77f29715b161054d9ba38db |
| --- /dev/null |
| +++ b/ui/events/touch_transformer.h |
| @@ -0,0 +1,32 @@ |
| +// 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_TRANSFORMER_H_ |
| +#define UI_EVENTS_TOUCH_TRANSFORMER_H_ |
| + |
| +#include "ui/events/events_base_export.h" |
| + |
| +namespace ui { |
| + |
| +// TouchTransformer 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 outputs. |
| +// In Chrome, we use TouchTransformer to remap the touch event's location from |
| +// the screen space to the root window space. |
| +struct EVENTS_BASE_EXPORT TouchTransformer { |
|
sadrul
2014/05/07 20:00:27
[copying over the comments from the earlier TouchC
Yufeng Shen (Slow to review)
2014/05/07 22:02:58
Done.
|
| + public: |
| + TouchTransformer(); |
| + |
| + float x_scale; |
| + float x_offset; |
| + float y_scale; |
| + float y_offset; |
| +}; |
| + |
| +} // namespace ui |
| + |
| +#endif // UI_EVENTS_TOUCH_TRANSFORMER_H_ |