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
This commit is contained in:
Ramanpreet Nara
2020-04-08 13:04:10 -07:00
committed by Facebook GitHub Bot
parent 432868b0c0
commit bf2609dca5
@@ -15,6 +15,9 @@
typedef void (^AnimatedOperation)(RCTNativeAnimatedNodesManager *nodesManager);
@interface RCTNativeAnimatedModule() <NativeAnimatedModuleSpec>
@end
@implementation RCTNativeAnimatedModule
{
RCTNativeAnimatedNodesManager *_nodesManager;
@@ -332,6 +335,14 @@ RCT_EXPORT_METHOD(removeAnimatedEventFromView:(double)viewTag
});
}
- (std::shared_ptr<facebook::react::TurboModule>)
getTurboModuleWithJsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
nativeInvoker:(std::shared_ptr<facebook::react::CallInvoker>)nativeInvoker
perfLogger:(id<RCTTurboModulePerformanceLogger>)perfLogger
{
return std::make_shared<facebook::react::NativeAnimatedModuleSpecJSI>(self, jsInvoker, nativeInvoker, perfLogger);
}
@end
Class RCTNativeAnimatedModuleCls(void) {