From bf2609dca565c2b67df321246a966caaff024b82 Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Wed, 8 Apr 2020 13:00:54 -0700 Subject: [PATCH] Make RCTNativeAnimatedModule into a TurboModule Summary: D20831545 integrated TurboModules with the bridge's `onBatchComplete` event. This fixed the RCTNativeAnimatedModule jank, so I'm re-converting RCTNativeAnimatedModule into a TurboModule. Changelog: [iOS][Fixed] - Make RCTNativeAnimatedModule TM-compatible Reviewed By: PeteTheHeat Differential Revision: D20850744 fbshipit-source-id: bb85a1bb27963e7d39bf149d0a3d7b71c88175da --- Libraries/NativeAnimation/RCTNativeAnimatedModule.mm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm b/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm index 487edcd6a71..a5a53684f9d 100644 --- a/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm +++ b/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm @@ -15,6 +15,9 @@ typedef void (^AnimatedOperation)(RCTNativeAnimatedNodesManager *nodesManager); +@interface RCTNativeAnimatedModule() +@end + @implementation RCTNativeAnimatedModule { RCTNativeAnimatedNodesManager *_nodesManager; @@ -332,6 +335,14 @@ RCT_EXPORT_METHOD(removeAnimatedEventFromView:(double)viewTag }); } +- (std::shared_ptr) + getTurboModuleWithJsInvoker:(std::shared_ptr)jsInvoker + nativeInvoker:(std::shared_ptr)nativeInvoker + perfLogger:(id)perfLogger +{ + return std::make_shared(self, jsInvoker, nativeInvoker, perfLogger); +} + @end Class RCTNativeAnimatedModuleCls(void) {