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

Unified Diff: ui/events/gesture_detection/scale_gesture_detector.h

Issue 1778063002: Eliminate pinch drift by removing touch radius from span calculation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shrink minimum scale span. Created 4 years, 9 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
Index: ui/events/gesture_detection/scale_gesture_detector.h
diff --git a/ui/events/gesture_detection/scale_gesture_detector.h b/ui/events/gesture_detection/scale_gesture_detector.h
index 43713150e4ae0dd2abf9656f80b59a81a4c5d1c8..38038bd25380aa96fc95fa14ce6e852d8ef0e744 100644
--- a/ui/events/gesture_detection/scale_gesture_detector.h
+++ b/ui/events/gesture_detection/scale_gesture_detector.h
@@ -29,9 +29,6 @@ class GESTURE_DETECTION_EXPORT ScaleGestureDetector {
// a radius of average pointer deviation from the focal point.
float span_slop;
- // Minimum accepted value for TouchMajor while scaling (in dips).
- float min_scaling_touch_major;
-
// Minimum span needed to initiate a scaling gesture (in dips).
float min_scaling_span;
@@ -89,11 +86,6 @@ class GESTURE_DETECTION_EXPORT ScaleGestureDetector {
ANCHORED_SCALE_MODE_STYLUS
};
- // The TouchMajor/TouchMinor elements of a MotionEvent can flutter/jitter on
- // some hardware/driver combos. Smooth out to get kinder, gentler behavior.
- void AddTouchHistory(const MotionEvent& ev);
- void ResetTouchHistory();
-
void ResetScaleWithSpan(float span);
ScaleGestureListener* const listener_;
@@ -114,15 +106,6 @@ class GESTURE_DETECTION_EXPORT ScaleGestureDetector {
float span_slop_;
float min_span_;
- // Bounds for recently seen values.
- float touch_upper_;
- float touch_lower_;
- float touch_history_last_accepted_;
- int touch_history_direction_;
- base::TimeTicks touch_history_last_accepted_time_;
- float touch_min_major_;
- float touch_max_major_;
-
float anchored_scale_start_x_;
float anchored_scale_start_y_;
AnchoredScaleMode anchored_scale_mode_;
« no previous file with comments | « ui/events/gesture_detection/gesture_provider_config_helper.cc ('k') | ui/events/gesture_detection/scale_gesture_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698