Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Maintenance work
View staffing
Description
```
compose/ui/ui/benchmark/src/androidTest/java/androidx/compose/ui/benchmark/input/pointer/ComposePreciseFingerTapIntegrationBenchmark.kt
compose/ui/ui/benchmark/src/androidTest/java/androidx/compose/ui/benchmark/input/pointer/ComposePreciseStylusTapIntegrationBenchmark.kt
compose/ui/ui/benchmark/src/androidTest/java/androidx/compose/ui/benchmark/input/pointer/ComposeTapIntegrationBenchmark.kt
```
These three benchmarks are preventing us from removing `getHostView()`. Benchmarks should generally be written in such a way that they can be tested on multiple platforms (using only common-code) to ensure Compose performance good across platforms. For example, if we care about touch events or STYLUS performance on Android, we probably care about it on iOS too. To achieve this, rather than directly creating a `android.view.MotionEvent` event within the test and passing it directly to an `android.view.View`, the test should interact through some platform-independent wrapper (which should probably live in the test-utils module).
I'm not super familiar with the structure of test-utils, so take this with a grain of salt, but at first glance, I might consider adding a `dispatchMotionEvent()` function to `ComposeExecutionControl` class, where the dispatchMotionEvent function does not take a `android.view.MotionEvent` but instead takes parameters like this: