-
Notifications
You must be signed in to change notification settings - Fork 175
[3P] Add touch support #8502
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
base: main
Are you sure you want to change the base?
[3P] Add touch support #8502
Conversation
🤖 Gemini Suggested Commit Message💡 Pro Tips for a Better Commit Message:
|
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.
Code Review
This pull request adds support for touch events by creating ui::TouchEvent from Starboard input events. The implementation has a few issues. There's a critical bug in a debug build that can cause a crash due to incorrect ordering of null checks and DCHECKs. Another critical issue is a potential use of an uninitialized variable in release builds if an unknown event type is received. I've also pointed out some areas for improvement, such as removing redundant logging and replacing a magic number with a named constant for better readability. Please address the critical issues and consider the other suggestions.
| namespace { | ||
|
|
||
| std::unique_ptr<ui::Event> CreateTouchInputEvent(const SbEvent* event) { | ||
| DCHECK(event); |
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.
In general we're replacing DCHECKs with CHECKs (see b/435425692), should we do the same here?
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.
🤷
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.
Wdyt about making this a CHECK for now instead? We can always change back if it seems like it causes crashes we could avoid otherwise (cc @jellefoks who I think wrote this code originally)
Bug: 447659892
8971726 to
5511acc
Compare
Bug: 447659892