-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hit test for a single tap now checked on main thread #1209
Hit test for a single tap now checked on main thread #1209
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing the thread a public API is called on can have an effect on the way the API is used (imagine if a consumer of the touch manager callback used dispatch_sync()
to the main queue, this change would start crashing their app). Therefore, I believe it may be a major API change. Would changing the call site in the haptic manager to dispatch to the main queue be a better fix here?
checking if single tap hit a view is now done on main thread
After doing more testing, I realized that only the single tap touch was not being hit tested on the main thread. I added a HAX to perform the hit test on the main thread and then notify the delegate on the background thread. |
* fixed documentation
Fixes #1207
This PR is ready for review.
Risk
This PR makes no API changes.
Testing Plan
Test cases for the
SDLTouchManager
were updated.Summary
Checking if a single tap is inside a
UIView
no longer causes the app to freeze for a few seconds. All checking is now done on the main thread.Changelog
Breaking Changes
Bug Fixes
UIView
no longer causes the app to freeze for a few seconds. All checking is now done on the main thread.CLA