mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
c8701b6b36
Summary: Couldn't make RCTImageEditingManager and RCTImageStoreManager TurboModule-compatible because their specs live in fb-internal code. I will tackle them in a subsequent diff. See T54946472. Changelog: [iOS][Added] Make RCTLocalAssetImageLoader and RCTGIFImageDecoder TurboModule-compatible Reviewed By: PeteTheHeat Differential Revision: D17936483 fbshipit-source-id: 2266c9ea1ca7ecd52717d9a963e39245da312312
37 lines
970 B
Plaintext
37 lines
970 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 "RCTImagePlugins.h"
|
|
|
|
#import <string>
|
|
#import <unordered_map>
|
|
|
|
Class RCTImageClassProvider(const char *name) {
|
|
static std::unordered_map<std::string, Class (*)(void)> sCoreModuleClassMap = {
|
|
{"GIFImageDecoder", RCTGIFImageDecoderCls},
|
|
{"ImageEditingManager", RCTImageEditingManagerCls},
|
|
{"ImageLoader", RCTImageLoaderCls},
|
|
{"ImageStoreManager", RCTImageStoreManagerCls},
|
|
{"LocalAssetImageLoader", RCTLocalAssetImageLoaderCls},
|
|
};
|
|
|
|
auto p = sCoreModuleClassMap.find(name);
|
|
if (p != sCoreModuleClassMap.end()) {
|
|
auto classFunc = p->second;
|
|
return classFunc();
|
|
}
|
|
return nil;
|
|
}
|
|
|
|
#endif // RN_DISABLE_OSS_PLUGIN_HEADER
|