-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Updates touch events in Fabric to be dispatched through the same pipeline as the rest of events, instead of relying on custom dispatch behavior. Previous method of handling touches was reusing Paper behavior which required: 1. Transform event into a Paper-compatible form of WritableArray and dispatch it to `RCTEventEmitter.receiveTouches`. 2. Intercept `receiveTouches` for Fabric and redirect it to `FabricEventEmitter` 3. Perform transformations copied from Paper JS renderer in Java, transform it to the final form and dispatch this event as usual after. The new behavior uses emitter's `receiveEvent` method directly to dispatch events. Additionally, it should decrease allocations done when transforming events during step 3 above, as `WritableNativeMap`-based operations performed many re-allocations when reading/re-creating arrays. Changelog: [Android][Changed] - Added an experimental touch dispatch path Reviewed By: JoshuaGross Differential Revision: D31280052 fbshipit-source-id: 829c2646ac6b0ebff0f0106159e76d84324ac732
- Loading branch information
1 parent
53fd0f4
commit a2feaeb
Showing
3 changed files
with
143 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters