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

Unified Diff: chrome/browser/android/vr_shell/vr_controller.h

Issue 2591253002: VR: Improve scrolling (Closed)
Patch Set: Remove touch_point_ + rebase Created 3 years, 11 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 | « no previous file | chrome/browser/android/vr_shell/vr_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3d4de038a81225641f6866655169d07492d77db5 100644
--- a/chrome/browser/android/vr_shell/vr_controller.h
+++ b/chrome/browser/android/vr_shell/vr_controller.h
@@ -129,7 +129,9 @@ 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_;
// A pointer storing the touch point from previous frame.
@@ -144,12 +146,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);
};
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698