summaryrefslogtreecommitdiff
path: root/include/lookahead_filter_interpreter.h
diff options
context:
space:
mode:
authorHarry Cutts <hcutts@google.com>2023-03-10 19:49:21 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-03-10 19:49:21 +0000
commita2cb809cb1d81ffb2ad30a952319f41800c5c7b5 (patch)
treee65830aa73b07fb96a0d5808413630dbade8bce8 /include/lookahead_filter_interpreter.h
parent1c8b10f780e75c31850372c7ddeacb4632f4b40b (diff)
parent20ab3e76e32f89c292a0bcb00d13854f45381500 (diff)
downloadlibchrome-gestures-a2cb809cb1d81ffb2ad30a952319f41800c5c7b5.tar.gz
Merge latest patches from upstream am: fdad07cb6e am: 771b6d93c6 am: 6c1bd82791 am: 20ab3e76e3
Original change: https://android-review.googlesource.com/c/platform/external/libchrome-gestures/+/2480579 Change-Id: I3dc2841504dc340f8091c70f05dae81cfc1a85bb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'include/lookahead_filter_interpreter.h')
-rw-r--r--include/lookahead_filter_interpreter.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/lookahead_filter_interpreter.h b/include/lookahead_filter_interpreter.h
index 33dcc9b..31aefe4 100644
--- a/include/lookahead_filter_interpreter.h
+++ b/include/lookahead_filter_interpreter.h
@@ -3,15 +3,16 @@
// found in the LICENSE file.
#include <algorithm>
+#include <list>
#include <map>
#include <memory>
+#include <vector>
#include <gtest/gtest.h> // For FRIEND_TEST
#include "include/filter_interpreter.h"
#include "include/finger_metrics.h"
#include "include/gestures.h"
-#include "include/list.h"
#include "include/prop_registry.h"
#include "include/tracer.h"
@@ -33,6 +34,8 @@ class LookaheadFilterInterpreter : public FilterInterpreter {
FRIEND_TEST(LookaheadFilterInterpreterTest, SimpleTest);
FRIEND_TEST(LookaheadFilterInterpreterTest, SpuriousCallbackTest);
FRIEND_TEST(LookaheadFilterInterpreterTest, VariableDelayTest);
+ FRIEND_TEST(LookaheadFilterInterpreterTest, QStateListTest);
+
public:
LookaheadFilterInterpreter(PropRegistry* prop_reg, Interpreter* next,
Tracer* tracer);
@@ -108,8 +111,12 @@ class LookaheadFilterInterpreter : public FilterInterpreter {
stime_t ExtraVariableDelay() const;
- List<QState> queue_;
- List<QState> free_list_;
+ class QStateList : public std::list<QState*> {
+ public:
+ QState* at(int offset);
+ } queue_;
+
+ std::vector<QState*> free_list_;
// The last id assigned to a contact (part of drumroll suppression)
short last_id_;