summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2023-02-13 15:57:44 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-02-13 15:57:44 +0000
commit6b6f1324bc14abba9cfa1232d1377e354f0ce0a1 (patch)
tree2f70f51eb0c32d15ae67dc1bd74623f05b812d72
parent9381183ad9ca92544eb1c45e0dada3bcca3744d1 (diff)
parent402ba203f42ea10e06eb7b846e99a64bb8465021 (diff)
downloadlibchrome-gestures-6b6f1324bc14abba9cfa1232d1377e354f0ce0a1.tar.gz
Merge remote-tracking branch 'aosp/upstream-main' into merge am: 402ba203f4
Original change: https://android-review.googlesource.com/c/platform/external/libchrome-gestures/+/2430752 Change-Id: I70c68b0c327d528ae9fc3a23d6c8db9e82414e3e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--METADATA.android4
-rw-r--r--include/gestures.h42
-rw-r--r--src/immediate_interpreter_unittest.cc2
3 files changed, 39 insertions, 9 deletions
diff --git a/METADATA.android b/METADATA.android
index 8df3226..d9478a9 100644
--- a/METADATA.android
+++ b/METADATA.android
@@ -6,7 +6,7 @@ third_party {
type: GIT
value: "https://chromium.googlesource.com/chromiumos/platform/gestures/"
}
- version: "10ca30a7497231a1c978264f4220c863f5d35727"
- last_upgrade_date { year: 2023 month: 01 day: 13 }
+ version: "ebe1f3fed44b84cc60294d76a680bb741876b3bd"
+ last_upgrade_date { year: 2023 month: 02 day: 10 }
license_type: NOTICE
}
diff --git a/include/gestures.h b/include/gestures.h
index 5a1acc9..e4f7cc2 100644
--- a/include/gestures.h
+++ b/include/gestures.h
@@ -261,13 +261,23 @@ struct HardwareState {
// the ordinal_* fields.
typedef struct {
- float dx, dy;
+ // The movement in the X axis. Positive values indicate motion to the right.
+ float dx;
+ // The movement in the Y axis. Positive values indicate downwards motion.
+ float dy;
float ordinal_dx, ordinal_dy;
} GestureMove;
// Represents scroll gestures on a touch device.
typedef struct{
- float dx, dy;
+ // The scroll movement in the X axis. Unlike with move gestures, *negative*
+ // values indicate the fingers moving to the right, unless the "Australian
+ // Scrolling" or "Invert Scrolling" properties are set.
+ float dx;
+ // The scroll movement in the Y axis. Unlike with move gestures, *negative*
+ // values indicate the fingers moving downwards, unless the "Australian
+ // Scrolling" or "Invert Scrolling" properties are set.
+ float dy;
float ordinal_dx, ordinal_dy;
// If set, stop_fling means that this scroll should stop flinging, thus
// if an interpreter suppresses it for any reason (e.g., rounds the size
@@ -293,19 +303,39 @@ typedef struct {
} GestureButtonsChange;
typedef struct {
- // fling velocity (valid when fling_state is GESTURES_FLING_START):
- float vx, vy;
+ // The fling velocity in the X axis, only valid when fling_state is
+ // GESTURES_FLING_START. Unlike with move gestures, *negative* values indicate
+ // the fingers moving to the right, unless the "Australian Scrolling" or
+ // "Invert Scrolling" properties are set.
+ float vx;
+ // The fling velocity in the Y axis, only valid when fling_state is
+ // GESTURES_FLING_START. Unlike with move gestures, *negative* values indicate
+ // the fingers moving downwards, unless the "Australian Scrolling" or "Invert
+ // Scrolling" properties are set.
+ float vy;
float ordinal_vx, ordinal_vy;
unsigned fling_state:1; // GESTURES_FLING_START or GESTURES_FLING_TAP_DOWN
} GestureFling;
typedef struct {
- float dx, dy;
+ // The swipe movement in the X axis. Positive values indicate motion to the
+ // right.
+ float dx;
+ // The swipe movement in the Y axis. Unlike with move gestures, *negative*
+ // values indicate downwards motion, unless the "Australian Scrolling"
+ // property is set.
+ float dy;
float ordinal_dx, ordinal_dy;
} GestureSwipe;
typedef struct {
- float dx, dy;
+ // The swipe movement in the X axis. Positive values indicate motion to the
+ // right.
+ float dx;
+ // The swipe movement in the Y axis. Unlike with move gestures, *negative*
+ // values indicate downwards motion, unless the "Australian Scrolling"
+ // property is set.
+ float dy;
float ordinal_dx, ordinal_dy;
} GestureFourFingerSwipe;
diff --git a/src/immediate_interpreter_unittest.cc b/src/immediate_interpreter_unittest.cc
index f5dd9a0..239cb27 100644
--- a/src/immediate_interpreter_unittest.cc
+++ b/src/immediate_interpreter_unittest.cc
@@ -2985,7 +2985,7 @@ TEST(ImmediateInterpreterTest, PinchTests) {
{make_hwstate(2.01, 0, 2, 2, &finger_states[22]), kAny},
{make_hwstate(2.02, 0, 2, 2, &finger_states[26]), kAny},
{make_hwstate(2.03, 0, 2, 2, &finger_states[30]), kAny},
- {make_hwstate(2.04, 0, 2, 2, &finger_states[32]), kNoPinch},
+ {make_hwstate(2.04, 0, 2, 2, &finger_states[30]), kNoPinch},
{make_hwstate(2.05, 0, 0, 0, NULL), kAny},