-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Moves pointer event sanitizing to engine. #13697
Conversation
e29c51d
to
1b26aa0
Compare
1b26aa0
to
fc70ae7
Compare
physicalX: packet.getFloat64(kStride * offset++, _kFakeHostEndian), | ||
physicalY: packet.getFloat64(kStride * offset++, _kFakeHostEndian), | ||
physicalDeltaX: packet.getFloat64(kStride * offset++, _kFakeHostEndian), | ||
physicalDeltaY: packet.getFloat64(kStride * offset++, _kFakeHostEndian), |
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.
Framework move and hover event need delta value. We have to calculate it in the engine, otherwise framework will still need to keep the state which defeat the purpose of this migration
buttons: packet.getInt64(kStride * offset++, _kFakeHostEndian), | ||
obscured: packet.getInt64(kStride * offset++, _kFakeHostEndian) != 0, | ||
synthesized: packet.getInt64(kStride * offset++, _kFakeHostEndian) != 0, |
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.
framework need to know if the pointer event is synthesized to be able to correctly calculate the drag velocity.
// converted_pointers. | ||
for (size_t i = 0; i < buffer_length / kBytesPerPointerData; i++) { | ||
PointerData pointer_data = | ||
*(reinterpret_cast<PointerData*>(&buffer[i * kBytesPerPointerData])); |
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.
@chinmaygarde Is this the right way to go? I am not sure what is the standard way to use copy constructor 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.
I apologize for my previous comment. I didn't see that the data structure was packed and you were reading from an offset that may not be properly aligned. Your first attempt was better. Please use the memcpy. Sorry for the confusion.
6d34443
to
06e42a9
Compare
@chinmaygarde this is ready for re review |
06e42a9
to
3edb72e
Compare
git@github.com:flutter/engine.git/compare/f4fba66c2fad...c812a62 git log f4fba66..c812a62 --no-merges --oneline 2019-11-19 jonahwilliams@google.com allow ignoring toString, hashCode, and == in api_conform_test (flutter/engine#13907) 2019-11-19 bkonyi@google.com Roll src/third_party/dart d9d5fbc109..eeca3fb1cb (5 commits) 2019-11-19 chinmaygarde@google.com Add virtual destructor to GPUSurfaceSoftwareDelegate. (flutter/engine#13918) 2019-11-19 47866232+chunhtai@users.noreply.github.com Moves pointer event sanitizing to engine. (flutter/engine#13697)
git@github.com:flutter/engine.git/compare/f4fba66c2fad...c812a62 git log f4fba66..c812a62 --no-merges --oneline 2019-11-19 jonahwilliams@google.com allow ignoring toString, hashCode, and == in api_conform_test (flutter/engine#13907) 2019-11-19 bkonyi@google.com Roll src/third_party/dart d9d5fbc109..eeca3fb1cb (5 commits) 2019-11-19 chinmaygarde@google.com Add virtual destructor to GPUSurfaceSoftwareDelegate. (flutter/engine#13918) 2019-11-19 47866232+chunhtai@users.noreply.github.com Moves pointer event sanitizing to engine. (flutter/engine#13697)
flutter/flutter#44217
flutter/flutter#20517
This pr reimplemeting the sanitizing in engine side.