Lines Matching refs:motions
144 const std::vector<std::pair<std::chrono::nanoseconds, float>>& motions) { in createAxisScrollMotionEventStream() argument
146 for (const auto& [timeStamp, value] : motions) { in createAxisScrollMotionEventStream()
172 const std::vector<PlanarMotionEventEntry>& motions) { in createTouchMotionEventStream() argument
173 if (motions.empty()) { in createTouchMotionEventStream()
178 for (size_t i = 0; i < motions.size(); i++) { in createTouchMotionEventStream()
179 const PlanarMotionEventEntry& entry = motions[i]; in createTouchMotionEventStream()
187 } else if ((i == motions.size() - 1) && pointerCount == 1) { in createTouchMotionEventStream()
190 const PlanarMotionEventEntry& previousEntry = motions[i-1]; in createTouchMotionEventStream()
191 const PlanarMotionEventEntry& nextEntry = motions[i+1]; in createTouchMotionEventStream()
245 const std::vector<PlanarMotionEventEntry>& motions, int32_t axis, uint32_t pointerId) { in computePlanarVelocity() argument
246 std::vector<MotionEvent> events = createTouchMotionEventStream(motions); in computePlanarVelocity()
251 const std::vector<PlanarMotionEventEntry>& motions, in computeAndCheckVelocity() argument
254 checkVelocity(computePlanarVelocity(strategy, motions, axis, pointerId), targetVelocity); in computeAndCheckVelocity()
259 const std::vector<std::pair<std::chrono::nanoseconds, float>>& motions, in computeAndCheckAxisScrollVelocity() argument
261 std::vector<MotionEvent> events = createAxisScrollMotionEventStream(motions); in computeAndCheckAxisScrollVelocity()
270 static void computeAndCheckQuadraticVelocity(const std::vector<PlanarMotionEventEntry>& motions, in computeAndCheckQuadraticVelocity() argument
273 computePlanarVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in computeAndCheckQuadraticVelocity()
276 computePlanarVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in computeAndCheckQuadraticVelocity()
309 std::vector<PlanarMotionEventEntry> motions = {{10ms, {{2, 4}}}, in TEST_F() local
314 EXPECT_EQ(computePlanarVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
316 computePlanarVelocity(VelocityTracker::Strategy::DEFAULT, motions, in TEST_F()
318 EXPECT_EQ(computePlanarVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
320 computePlanarVelocity(VelocityTracker::Strategy::DEFAULT, motions, in TEST_F()
368 std::vector<PlanarMotionEventEntry> motions = {{10ms, {{1, 2}}}, in TEST_F() local
374 computeAndCheckVelocity(VelocityTracker::Strategy::DEFAULT, motions, AMOTION_EVENT_AXIS_X, 100); in TEST_F()
375 computeAndCheckVelocity(VelocityTracker::Strategy::DEFAULT, motions, AMOTION_EVENT_AXIS_Y, 200); in TEST_F()
383 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
396 computeAndCheckVelocity(VelocityTracker::Strategy::DEFAULT, motions, AMOTION_EVENT_AXIS_X, 100, in TEST_F()
398 computeAndCheckVelocity(VelocityTracker::Strategy::DEFAULT, motions, AMOTION_EVENT_AXIS_X, 3455, in TEST_F()
403 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
415 std::vector<MotionEvent> events = createTouchMotionEventStream(motions); in TEST_F()
464 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
470 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
476 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
482 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, 0); in TEST_F()
483 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, 0); in TEST_F()
488 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
491 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, 500); in TEST_F()
492 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, 500); in TEST_F()
499 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
505 std::vector<MotionEvent> events = createTouchMotionEventStream(motions); in TEST_F()
530 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
538 std::vector<MotionEvent> events = createTouchMotionEventStream(motions); in TEST_F()
595 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
605 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
607 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
630 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
649 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
651 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
653 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
655 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
662 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
682 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
684 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
691 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
712 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
714 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
716 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
718 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
725 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
746 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
748 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
750 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
752 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
759 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
776 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
778 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
785 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
802 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
804 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
811 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
827 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
829 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
831 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
833 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
840 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
854 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
856 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
863 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
875 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
877 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
884 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
905 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
907 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
909 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
911 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
918 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
939 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
941 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
943 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
945 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
952 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
966 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
968 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
970 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
972 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
979 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1000 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1002 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1009 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1027 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
1029 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
1031 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1033 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1040 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1060 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1062 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1069 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1081 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1083 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1090 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1102 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1104 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1111 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1124 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
1126 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
1128 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1130 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1142 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1151 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
1153 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1155 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
1157 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_Y, in TEST_F()
1171 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1174 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
1176 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, 1000); in TEST_F()
1185 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1191 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
1193 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
1203 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1211 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
1214 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
1217 computeAndCheckVelocity(VelocityTracker::Strategy::IMPULSE, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
1220 computeAndCheckVelocity(VelocityTracker::Strategy::LSQ2, motions, AMOTION_EVENT_AXIS_X, in TEST_F()
1251 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1262 computeAndCheckQuadraticVelocity(motions, 0); in TEST_F()
1269 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1280 computeAndCheckQuadraticVelocity(motions, 1E3); in TEST_F()
1287 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1298 computeAndCheckQuadraticVelocity(motions, 4.5E3); in TEST_F()
1305 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1316 computeAndCheckQuadraticVelocity(motions, 6E3); in TEST_F()
1323 std::vector<PlanarMotionEventEntry> motions = { in TEST_F() local
1334 computeAndCheckQuadraticVelocity(motions, 0E3); in TEST_F()
1339 std::vector<std::pair<std::chrono::nanoseconds, float>> motions = { in TEST_F() local
1348 computeAndCheckAxisScrollVelocity(VelocityTracker::Strategy::IMPULSE, motions, {764.345703}); in TEST_F()
1353 std::vector<std::pair<std::chrono::nanoseconds, float>> motions = { in TEST_F() local
1359 computeAndCheckAxisScrollVelocity(VelocityTracker::Strategy::IMPULSE, motions, {-27.86}); in TEST_F()
1363 std::vector<std::pair<std::chrono::nanoseconds, float>> motions = { in TEST_F() local
1369 computeAndCheckAxisScrollVelocity(VelocityTracker::Strategy::IMPULSE, motions, {31.92}); in TEST_F()
1373 std::vector<std::pair<std::chrono::nanoseconds, float>> motions = { in TEST_F() local
1393 computeAndCheckAxisScrollVelocity(VelocityTracker::Strategy::IMPULSE, motions, {-9.73}); in TEST_F()
1398 std::vector<std::pair<std::chrono::nanoseconds, float>> motions = { in TEST_F() local
1405 std::vector<MotionEvent> events = createAxisScrollMotionEventStream(motions); in TEST_F()
1413 std::vector<std::pair<std::chrono::nanoseconds, float>> motions = {{1ns, 2.12}, {3ns, 2.12}, in TEST_F() local
1417 computeAndCheckAxisScrollVelocity(VelocityTracker::Strategy::IMPULSE, motions, {1690236059.86}); in TEST_F()
1421 std::vector<std::pair<std::chrono::nanoseconds, float>> motions = {{1ms, 5}, {2ms, 10}}; in TEST_F() local
1423 computeAndCheckAxisScrollVelocity(VelocityTracker::Strategy::IMPULSE, motions, {10000}); in TEST_F()
1427 std::vector<std::pair<std::chrono::nanoseconds, float>> motions = {{1ms, 20}, {2ms, 20}, in TEST_F() local
1431 computeAndCheckAxisScrollVelocity(VelocityTracker::Strategy::IMPULSE, motions, {20000}); in TEST_F()
1435 std::vector<std::pair<std::chrono::nanoseconds, float>> motions = {{1ns, 0}, {2ns, 0}, in TEST_F() local
1439 computeAndCheckAxisScrollVelocity(VelocityTracker::Strategy::IMPULSE, motions, {0}); in TEST_F()
1443 std::vector<std::pair<std::chrono::nanoseconds, float>> motions = {}; in TEST_F() local
1445 computeAndCheckAxisScrollVelocity(VelocityTracker::Strategy::IMPULSE, motions, std::nullopt); in TEST_F()