blob: cf299c0f6e89fa26de722de4167a2c23d79e0e85 [file] [log] [blame]
Siarhei Vishniakoud0784762019-11-01 15:33:48 -07001/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <benchmark/benchmark.h>
18
Siarhei Vishniakouf2652122021-03-05 21:39:46 +000019#include <android/os/IInputConstants.h>
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070020#include <binder/Binder.h>
chaviw3277faf2021-05-19 16:45:23 -050021#include <gui/constants.h>
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070022#include "../dispatcher/InputDispatcher.h"
23
Siarhei Vishniakou18050092021-09-01 13:32:49 -070024using android::base::Result;
chaviw3277faf2021-05-19 16:45:23 -050025using android::gui::WindowInfo;
26using android::gui::WindowInfoHandle;
Siarhei Vishniakouf2652122021-03-05 21:39:46 +000027using android::os::IInputConstants;
Siarhei Vishniakouae6229e2019-12-30 16:23:19 -080028using android::os::InputEventInjectionResult;
29using android::os::InputEventInjectionSync;
30
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070031namespace android::inputdispatcher {
32
33// An arbitrary device id.
Prabir Pradhan5735a322022-04-11 17:23:34 +000034constexpr int32_t DEVICE_ID = 1;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070035
Prabir Pradhan5735a322022-04-11 17:23:34 +000036// The default pid and uid for windows created by the test.
37constexpr int32_t WINDOW_PID = 999;
38constexpr int32_t WINDOW_UID = 1001;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070039
Siarhei Vishniakou097c3db2020-05-06 14:18:38 -070040static constexpr std::chrono::duration INJECT_EVENT_TIMEOUT = 5s;
41static constexpr std::chrono::nanoseconds DISPATCHING_TIMEOUT = 100ms;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070042
43static nsecs_t now() {
44 return systemTime(SYSTEM_TIME_MONOTONIC);
45}
46
47// --- FakeInputDispatcherPolicy ---
48
49class FakeInputDispatcherPolicy : public InputDispatcherPolicyInterface {
50public:
Prabir Pradhana41d2442023-04-20 21:30:40 +000051 FakeInputDispatcherPolicy() = default;
52 virtual ~FakeInputDispatcherPolicy() = default;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070053
54private:
Siarhei Vishniakouc1ae5562020-06-30 14:22:57 -050055 void notifyConfigurationChanged(nsecs_t) override {}
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070056
Siarhei Vishniakou234129c2020-10-22 22:28:12 -050057 void notifyNoFocusedWindowAnr(
58 const std::shared_ptr<InputApplicationHandle>& applicationHandle) override {
59 ALOGE("There is no focused window for %s", applicationHandle->getName().c_str());
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070060 }
61
Prabir Pradhanedd96402022-02-15 01:46:16 -080062 void notifyWindowUnresponsive(const sp<IBinder>& connectionToken, std::optional<int32_t> pid,
Siarhei Vishniakou3c63fa42020-12-15 02:59:54 +000063 const std::string& reason) override {
64 ALOGE("Window is not responding: %s", reason.c_str());
Siarhei Vishniakou234129c2020-10-22 22:28:12 -050065 }
66
Prabir Pradhanedd96402022-02-15 01:46:16 -080067 void notifyWindowResponsive(const sp<IBinder>& connectionToken,
68 std::optional<int32_t> pid) override {}
Siarhei Vishniakou234129c2020-10-22 22:28:12 -050069
Siarhei Vishniakouc1ae5562020-06-30 14:22:57 -050070 void notifyInputChannelBroken(const sp<IBinder>&) override {}
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070071
Siarhei Vishniakouc1ae5562020-06-30 14:22:57 -050072 void notifyFocusChanged(const sp<IBinder>&, const sp<IBinder>&) override {}
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070073
Chris Yef59a2f42020-10-16 12:55:26 -070074 void notifySensorEvent(int32_t deviceId, InputDeviceSensorType sensorType,
75 InputDeviceSensorAccuracy accuracy, nsecs_t timestamp,
76 const std::vector<float>& values) override {}
77
78 void notifySensorAccuracy(int32_t deviceId, InputDeviceSensorType sensorType,
79 InputDeviceSensorAccuracy accuracy) override {}
80
Chris Yefb552902021-02-03 17:18:37 -080081 void notifyVibratorState(int32_t deviceId, bool isOn) override {}
82
Prabir Pradhana41d2442023-04-20 21:30:40 +000083 InputDispatcherConfiguration getDispatcherConfiguration() override { return mConfig; }
84
85 bool filterInputEvent(const InputEvent& inputEvent, uint32_t policyFlags) override {
86 return true; // dispatch event normally
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070087 }
88
Prabir Pradhana41d2442023-04-20 21:30:40 +000089 void interceptKeyBeforeQueueing(const KeyEvent&, uint32_t&) override {}
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070090
Siarhei Vishniakouc1ae5562020-06-30 14:22:57 -050091 void interceptMotionBeforeQueueing(int32_t, nsecs_t, uint32_t&) override {}
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070092
Prabir Pradhana41d2442023-04-20 21:30:40 +000093 nsecs_t interceptKeyBeforeDispatching(const sp<IBinder>&, const KeyEvent&, uint32_t) override {
Siarhei Vishniakoud0784762019-11-01 15:33:48 -070094 return 0;
95 }
96
Prabir Pradhana41d2442023-04-20 21:30:40 +000097 std::optional<KeyEvent> dispatchUnhandledKey(const sp<IBinder>&, const KeyEvent&,
98 uint32_t) override {
99 return {};
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700100 }
101
Siarhei Vishniakouc1ae5562020-06-30 14:22:57 -0500102 void notifySwitch(nsecs_t, uint32_t, uint32_t, uint32_t) override {}
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700103
Sean Stoutb4e0a592021-02-23 07:34:53 -0800104 void pokeUserActivity(nsecs_t, int32_t, int32_t) override {}
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700105
Siarhei Vishniakouc1ae5562020-06-30 14:22:57 -0500106 void onPointerDownOutsideFocus(const sp<IBinder>& newToken) override {}
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700107
Prabir Pradhan5cc1a692021-08-06 14:01:18 +0000108 void setPointerCapture(const PointerCaptureRequest&) override {}
Prabir Pradhan99987712020-11-10 18:43:05 -0800109
arthurhungf452d0b2021-01-06 00:19:52 +0800110 void notifyDropWindow(const sp<IBinder>&, float x, float y) override {}
111
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700112 InputDispatcherConfiguration mConfig;
113};
114
115class FakeApplicationHandle : public InputApplicationHandle {
116public:
117 FakeApplicationHandle() {}
118 virtual ~FakeApplicationHandle() {}
119
120 virtual bool updateInfo() {
Siarhei Vishniakou70622952020-07-30 11:17:23 -0500121 mInfo.dispatchingTimeoutMillis =
122 std::chrono::duration_cast<std::chrono::milliseconds>(DISPATCHING_TIMEOUT).count();
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700123 return true;
124 }
125};
126
127class FakeInputReceiver {
128public:
129 void consumeEvent() {
Siarhei Vishniakoud549b252020-08-11 11:25:26 -0500130 uint32_t consumeSeq = 0;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700131 InputEvent* event;
132
Siarhei Vishniakouadfd4fa2019-12-20 11:02:58 -0800133 std::chrono::time_point start = std::chrono::steady_clock::now();
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700134 status_t result = WOULD_BLOCK;
135 while (result == WOULD_BLOCK) {
Siarhei Vishniakouadfd4fa2019-12-20 11:02:58 -0800136 std::chrono::duration elapsed = std::chrono::steady_clock::now() - start;
137 if (elapsed > 10ms) {
138 ALOGE("Waited too long for consumer to produce an event, giving up");
139 break;
140 }
Harry Cutts33476232023-01-30 19:57:29 +0000141 result = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, -1, &consumeSeq,
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700142 &event);
143 }
144 if (result != OK) {
145 ALOGE("Received result = %d from consume()", result);
146 }
147 result = mConsumer->sendFinishedSignal(consumeSeq, true);
148 if (result != OK) {
149 ALOGE("Received result = %d from sendFinishedSignal", result);
150 }
151 }
152
153protected:
Siarhei Vishniakou18050092021-09-01 13:32:49 -0700154 explicit FakeInputReceiver(InputDispatcher& dispatcher, const std::string name) {
155 Result<std::unique_ptr<InputChannel>> channelResult = dispatcher.createInputChannel(name);
156 LOG_ALWAYS_FATAL_IF(!channelResult.ok());
157 mClientChannel = std::move(*channelResult);
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700158 mConsumer = std::make_unique<InputConsumer>(mClientChannel);
159 }
160
161 virtual ~FakeInputReceiver() {}
162
Garfield Tan15601662020-09-22 15:32:38 -0700163 std::shared_ptr<InputChannel> mClientChannel;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700164 std::unique_ptr<InputConsumer> mConsumer;
165 PreallocatedInputEventFactory mEventFactory;
166};
167
chaviw3277faf2021-05-19 16:45:23 -0500168class FakeWindowHandle : public WindowInfoHandle, public FakeInputReceiver {
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700169public:
170 static const int32_t WIDTH = 200;
171 static const int32_t HEIGHT = 200;
172
Chris Yea209fde2020-07-22 13:54:51 -0700173 FakeWindowHandle(const std::shared_ptr<InputApplicationHandle>& inputApplicationHandle,
Siarhei Vishniakou18050092021-09-01 13:32:49 -0700174 InputDispatcher& dispatcher, const std::string name)
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700175 : FakeInputReceiver(dispatcher, name), mFrame(Rect(0, 0, WIDTH, HEIGHT)) {
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700176 inputApplicationHandle->updateInfo();
chaviw15fab6f2021-06-07 14:15:52 -0500177 updateInfo();
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700178 mInfo.applicationInfo = *inputApplicationHandle->getInfo();
179 }
180
chaviw15fab6f2021-06-07 14:15:52 -0500181 void updateInfo() {
Garfield Tan15601662020-09-22 15:32:38 -0700182 mInfo.token = mClientChannel->getConnectionToken();
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700183 mInfo.name = "FakeWindowHandle";
Siarhei Vishniakouc1ae5562020-06-30 14:22:57 -0500184 mInfo.dispatchingTimeout = DISPATCHING_TIMEOUT;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700185 mInfo.frameLeft = mFrame.left;
186 mInfo.frameTop = mFrame.top;
187 mInfo.frameRight = mFrame.right;
188 mInfo.frameBottom = mFrame.bottom;
189 mInfo.globalScaleFactor = 1.0;
190 mInfo.touchableRegion.clear();
191 mInfo.addTouchableRegion(mFrame);
Prabir Pradhan5735a322022-04-11 17:23:34 +0000192 mInfo.ownerPid = WINDOW_PID;
193 mInfo.ownerUid = WINDOW_UID;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700194 mInfo.displayId = ADISPLAY_ID_DEFAULT;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700195 }
196
197protected:
198 Rect mFrame;
199};
200
201static MotionEvent generateMotionEvent() {
202 PointerProperties pointerProperties[1];
203 PointerCoords pointerCoords[1];
204
205 pointerProperties[0].clear();
206 pointerProperties[0].id = 0;
Siarhei Vishniakou6d73f832022-07-21 17:27:03 -0700207 pointerProperties[0].toolType = ToolType::FINGER;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700208
209 pointerCoords[0].clear();
210 pointerCoords[0].setAxisValue(AMOTION_EVENT_AXIS_X, 100);
211 pointerCoords[0].setAxisValue(AMOTION_EVENT_AXIS_Y, 100);
212
213 const nsecs_t currentTime = now();
214
chaviw9eaa22c2020-07-01 16:21:27 -0700215 ui::Transform identityTransform;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700216 MotionEvent event;
Siarhei Vishniakouf2652122021-03-05 21:39:46 +0000217 event.initialize(IInputConstants::INVALID_INPUT_EVENT_ID, DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
Garfield Tanfbe732e2020-01-24 11:26:14 -0800218 ADISPLAY_ID_DEFAULT, INVALID_HMAC, AMOTION_EVENT_ACTION_DOWN,
219 /* actionButton */ 0, /* flags */ 0,
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700220 /* edgeFlags */ 0, AMETA_NONE, /* buttonState */ 0, MotionClassification::NONE,
chaviw9eaa22c2020-07-01 16:21:27 -0700221 identityTransform, /* xPrecision */ 0,
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700222 /* yPrecision */ 0, AMOTION_EVENT_INVALID_CURSOR_POSITION,
Prabir Pradhanb9b18502021-08-26 12:30:32 -0700223 AMOTION_EVENT_INVALID_CURSOR_POSITION, identityTransform, currentTime,
224 currentTime,
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700225 /*pointerCount*/ 1, pointerProperties, pointerCoords);
226 return event;
227}
228
229static NotifyMotionArgs generateMotionArgs() {
230 PointerProperties pointerProperties[1];
231 PointerCoords pointerCoords[1];
232
233 pointerProperties[0].clear();
234 pointerProperties[0].id = 0;
Siarhei Vishniakou6d73f832022-07-21 17:27:03 -0700235 pointerProperties[0].toolType = ToolType::FINGER;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700236
237 pointerCoords[0].clear();
238 pointerCoords[0].setAxisValue(AMOTION_EVENT_AXIS_X, 100);
239 pointerCoords[0].setAxisValue(AMOTION_EVENT_AXIS_Y, 100);
240
241 const nsecs_t currentTime = now();
242 // Define a valid motion event.
Siarhei Vishniakouf2652122021-03-05 21:39:46 +0000243 NotifyMotionArgs args(IInputConstants::INVALID_INPUT_EVENT_ID, currentTime, currentTime,
244 DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN, ADISPLAY_ID_DEFAULT,
245 POLICY_FLAG_PASS_TO_USER, AMOTION_EVENT_ACTION_DOWN,
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700246 /* actionButton */ 0, /* flags */ 0, AMETA_NONE, /* buttonState */ 0,
247 MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, 1,
248 pointerProperties, pointerCoords,
249 /* xPrecision */ 0, /* yPrecision */ 0,
250 AMOTION_EVENT_INVALID_CURSOR_POSITION,
251 AMOTION_EVENT_INVALID_CURSOR_POSITION, currentTime, /* videoFrames */ {});
252
253 return args;
254}
255
256static void benchmarkNotifyMotion(benchmark::State& state) {
257 // Create dispatcher
Prabir Pradhana41d2442023-04-20 21:30:40 +0000258 FakeInputDispatcherPolicy fakePolicy;
Siarhei Vishniakou8c84b802022-03-23 15:48:41 -0700259 InputDispatcher dispatcher(fakePolicy);
260 dispatcher.setInputDispatchMode(/*enabled*/ true, /*frozen*/ false);
261 dispatcher.start();
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700262
263 // Create a window that will receive motion events
Chris Yea209fde2020-07-22 13:54:51 -0700264 std::shared_ptr<FakeApplicationHandle> application = std::make_shared<FakeApplicationHandle>();
Siarhei Vishniakouaed7ad02022-08-03 15:04:33 -0700265 sp<FakeWindowHandle> window =
266 sp<FakeWindowHandle>::make(application, dispatcher, "Fake Window");
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700267
Siarhei Vishniakou8c84b802022-03-23 15:48:41 -0700268 dispatcher.setInputWindows({{ADISPLAY_ID_DEFAULT, {window}}});
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700269
270 NotifyMotionArgs motionArgs = generateMotionArgs();
271
272 for (auto _ : state) {
273 // Send ACTION_DOWN
274 motionArgs.action = AMOTION_EVENT_ACTION_DOWN;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700275 motionArgs.downTime = now();
276 motionArgs.eventTime = motionArgs.downTime;
Prabir Pradhan678438e2023-04-13 19:32:51 +0000277 dispatcher.notifyMotion(motionArgs);
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700278
279 // Send ACTION_UP
280 motionArgs.action = AMOTION_EVENT_ACTION_UP;
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700281 motionArgs.eventTime = now();
Prabir Pradhan678438e2023-04-13 19:32:51 +0000282 dispatcher.notifyMotion(motionArgs);
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700283
284 window->consumeEvent();
285 window->consumeEvent();
286 }
287
Siarhei Vishniakou8c84b802022-03-23 15:48:41 -0700288 dispatcher.stop();
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700289}
290
291static void benchmarkInjectMotion(benchmark::State& state) {
292 // Create dispatcher
Prabir Pradhana41d2442023-04-20 21:30:40 +0000293 FakeInputDispatcherPolicy fakePolicy;
Siarhei Vishniakou8c84b802022-03-23 15:48:41 -0700294 InputDispatcher dispatcher(fakePolicy);
295 dispatcher.setInputDispatchMode(/*enabled*/ true, /*frozen*/ false);
296 dispatcher.start();
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700297
298 // Create a window that will receive motion events
Chris Yea209fde2020-07-22 13:54:51 -0700299 std::shared_ptr<FakeApplicationHandle> application = std::make_shared<FakeApplicationHandle>();
Siarhei Vishniakouaed7ad02022-08-03 15:04:33 -0700300 sp<FakeWindowHandle> window =
301 sp<FakeWindowHandle>::make(application, dispatcher, "Fake Window");
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700302
Siarhei Vishniakou8c84b802022-03-23 15:48:41 -0700303 dispatcher.setInputWindows({{ADISPLAY_ID_DEFAULT, {window}}});
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700304
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700305 for (auto _ : state) {
Siarhei Vishniakouadfd4fa2019-12-20 11:02:58 -0800306 MotionEvent event = generateMotionEvent();
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700307 // Send ACTION_DOWN
Harry Cutts33476232023-01-30 19:57:29 +0000308 dispatcher.injectInputEvent(&event, /*targetUid=*/{}, InputEventInjectionSync::NONE,
Prabir Pradhan5735a322022-04-11 17:23:34 +0000309 INJECT_EVENT_TIMEOUT,
Siarhei Vishniakou8c84b802022-03-23 15:48:41 -0700310 POLICY_FLAG_FILTERED | POLICY_FLAG_PASS_TO_USER);
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700311
312 // Send ACTION_UP
313 event.setAction(AMOTION_EVENT_ACTION_UP);
Harry Cutts33476232023-01-30 19:57:29 +0000314 dispatcher.injectInputEvent(&event, /*targetUid=*/{}, InputEventInjectionSync::NONE,
Prabir Pradhan5735a322022-04-11 17:23:34 +0000315 INJECT_EVENT_TIMEOUT,
Siarhei Vishniakou8c84b802022-03-23 15:48:41 -0700316 POLICY_FLAG_FILTERED | POLICY_FLAG_PASS_TO_USER);
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700317
318 window->consumeEvent();
319 window->consumeEvent();
320 }
321
Siarhei Vishniakou8c84b802022-03-23 15:48:41 -0700322 dispatcher.stop();
323}
324
325static void benchmarkOnWindowInfosChanged(benchmark::State& state) {
326 // Create dispatcher
Prabir Pradhana41d2442023-04-20 21:30:40 +0000327 FakeInputDispatcherPolicy fakePolicy;
Siarhei Vishniakou8c84b802022-03-23 15:48:41 -0700328 InputDispatcher dispatcher(fakePolicy);
329 dispatcher.setInputDispatchMode(/*enabled*/ true, /*frozen*/ false);
330 dispatcher.start();
331
332 // Create a window
333 std::shared_ptr<FakeApplicationHandle> application = std::make_shared<FakeApplicationHandle>();
Siarhei Vishniakouaed7ad02022-08-03 15:04:33 -0700334 sp<FakeWindowHandle> window =
335 sp<FakeWindowHandle>::make(application, dispatcher, "Fake Window");
Siarhei Vishniakou8c84b802022-03-23 15:48:41 -0700336
337 std::vector<gui::WindowInfo> windowInfos{*window->getInfo()};
338 gui::DisplayInfo info;
339 info.displayId = window->getInfo()->displayId;
340 std::vector<gui::DisplayInfo> displayInfos{info};
341
342 for (auto _ : state) {
343 dispatcher.onWindowInfosChanged(windowInfos, displayInfos);
Harry Cutts33476232023-01-30 19:57:29 +0000344 dispatcher.onWindowInfosChanged(/*windowInfos=*/{}, /*displayInfos=*/{});
Siarhei Vishniakou8c84b802022-03-23 15:48:41 -0700345 }
346 dispatcher.stop();
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700347}
348
349BENCHMARK(benchmarkNotifyMotion);
350BENCHMARK(benchmarkInjectMotion);
Siarhei Vishniakou8c84b802022-03-23 15:48:41 -0700351BENCHMARK(benchmarkOnWindowInfosChanged);
Siarhei Vishniakoud0784762019-11-01 15:33:48 -0700352
353} // namespace android::inputdispatcher
354
355BENCHMARK_MAIN();