mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
d1c3c2d084
Summary: The Animated native module cannot be converted to a TM because it has perf regressions when used in conjunction with Paper renderer. Instead of fixing these complicated perf issues (which will disappear when Fabric ships this half), temporarily fork the native module. The new fork is converted to a TM, and only used to unblock bridgeless mode testing. Changelog:[Internal] Reviewed By: RSNara Differential Revision: D22651010 fbshipit-source-id: 912123ef38ac8c66025b7bba34a65ec6d98f330d
34 lines
848 B
Plaintext
34 lines
848 B
Plaintext
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @generated by an internal plugin build system
|
|
*/
|
|
|
|
#ifndef RN_DISABLE_OSS_PLUGIN_HEADER
|
|
|
|
// OSS-compatibility layer
|
|
|
|
#import "RCTAnimationPlugins.h"
|
|
|
|
#import <string>
|
|
#import <unordered_map>
|
|
|
|
Class RCTAnimationClassProvider(const char *name) {
|
|
static std::unordered_map<std::string, Class (*)(void)> sCoreModuleClassMap = {
|
|
{"NativeAnimatedModule", RCTNativeAnimatedModuleCls},
|
|
{"NativeAnimatedTurboModule", RCTNativeAnimatedTurboModuleCls},
|
|
};
|
|
|
|
auto p = sCoreModuleClassMap.find(name);
|
|
if (p != sCoreModuleClassMap.end()) {
|
|
auto classFunc = p->second;
|
|
return classFunc();
|
|
}
|
|
return nil;
|
|
}
|
|
|
|
#endif // RN_DISABLE_OSS_PLUGIN_HEADER
|