OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ | 5 #ifndef ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ |
6 #define ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ | 6 #define ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/display/display_controller.h" | 9 #include "ash/display/display_controller.h" |
10 #include "ui/gfx/transform.h" | 10 #include "ui/gfx/transform.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 const ui::TouchscreenDevice& touchscreen, | 54 const ui::TouchscreenDevice& touchscreen, |
55 const gfx::Size& framebuffer_size) const; | 55 const gfx::Size& framebuffer_size) const; |
56 | 56 |
57 // Returns the scaling factor for the touch radius such that it scales the | 57 // Returns the scaling factor for the touch radius such that it scales the |
58 // radius from |touch_device|'s coordinate system to the |touch_display|'s | 58 // radius from |touch_device|'s coordinate system to the |touch_display|'s |
59 // coordinate system. | 59 // coordinate system. |
60 double GetTouchResolutionScale( | 60 double GetTouchResolutionScale( |
61 const DisplayInfo& touch_display, | 61 const DisplayInfo& touch_display, |
62 const ui::TouchscreenDevice& touch_device) const; | 62 const ui::TouchscreenDevice& touch_device) const; |
63 | 63 |
| 64 // For the provided |display| update the touch radius mapping. |
| 65 void UpdateTouchRadius(const DisplayInfo& display) const; |
| 66 |
| 67 // For a given |target_display| and |target_display_id| update the touch |
| 68 // transformation based on the touchscreen associated with |touch_display|. |
| 69 // |target_display_id| is the display id whose root window will receive the |
| 70 // touch events. |
| 71 // |touch_display| is the physical display that has the touchscreen |
| 72 // from which the events arrive. |
| 73 // |target_display| provides the dimensions to which the touch event will be |
| 74 // transformed. |
| 75 void UpdateTouchTransform(int64_t target_display_id, |
| 76 const DisplayInfo& touch_display, |
| 77 const DisplayInfo& target_display) const; |
| 78 |
64 DISALLOW_COPY_AND_ASSIGN(TouchTransformerController); | 79 DISALLOW_COPY_AND_ASSIGN(TouchTransformerController); |
65 }; | 80 }; |
66 | 81 |
67 } // namespace ash | 82 } // namespace ash |
68 | 83 |
69 #endif // ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ | 84 #endif // ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ |
OLD | NEW |