Chromium Code Reviews| Index: chrome/browser/android/vr_shell/vr_controller.h |
| diff --git a/chrome/browser/android/vr_shell/vr_controller.h b/chrome/browser/android/vr_shell/vr_controller.h |
| index 7580500332ecf5ba8818b980521724078578941a..44f0aab27dfd8a10fb51c9bbdc82f84995ca0889 100644 |
| --- a/chrome/browser/android/vr_shell/vr_controller.h |
| +++ b/chrome/browser/android/vr_shell/vr_controller.h |
| @@ -129,9 +129,14 @@ class VrController { |
| float last_qx_; |
| bool pinch_started_; |
| bool zoom_in_progress_ = false; |
| + bool touch_position_changed_ = false; |
| + // Current touch info after the extrapolation. |
| std::unique_ptr<TouchInfo> touch_info_; |
| + // Current touch position reported by touchpad. |
| + std::unique_ptr<TouchPoint> touch_point_; |
|
bshe
2017/01/09 19:38:54
Is it possible to use cur_touch_point_ directly to
asimjour1
2017/01/11 21:59:45
It is possible. But more changes would be needed.
|
| + |
| // A pointer storing the touch point from previous frame. |
| std::unique_ptr<TouchPoint> prev_touch_point_; |
| @@ -144,12 +149,18 @@ class VrController { |
| // Overall velocity |
| gvr::Vec2f overall_velocity_; |
| + // Last velocity that is used for fling and direction detection |
| + gvr::Vec2f last_velocity_; |
| + |
| // Displacement of the touch point from the previews to the current touch |
| gvr::Vec2f displacement_; |
| int64_t last_touch_timestamp_ = 0; |
| int64_t last_timestamp_nanos_ = 0; |
| + // Number of consecutively extrapolated touch points |
| + int extrapolated_touch_ = 0; |
| + |
| DISALLOW_COPY_AND_ASSIGN(VrController); |
| }; |