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.
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
| physicalDeltaY: packet.getFloat64(kStride * offset++, _kFakeHostEndian), | ||
| 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.
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.
@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.
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
[email protected]:flutter/engine.git/compare/f4fba66c2fad...c812a62 git log f4fba66..c812a62 --no-merges --oneline 2019-11-19 [email protected] allow ignoring toString, hashCode, and == in api_conform_test (flutter/engine#13907) 2019-11-19 [email protected] Roll src/third_party/dart d9d5fbc109..eeca3fb1cb (5 commits) 2019-11-19 [email protected] Add virtual destructor to GPUSurfaceSoftwareDelegate. (flutter/engine#13918) 2019-11-19 [email protected] Moves pointer event sanitizing to engine. (flutter/engine#13697)
flutter/flutter#44217
flutter/flutter#20517
This pr reimplemeting the sanitizing in engine side.