Set MobileConfig for Fabric logging in FBReactModule
Summary: Changelog: [RN][iOS] Allow gate to be set for Fabric logging from the React Module Reviewed By: fkgozali Differential Revision: D24256546 fbshipit-source-id: 7b290efb9abd3035559f743e6e5b6701e02053e1
This commit is contained in:
Родитель
ea93151f21
Коммит
cd6ebcdd82
|
@ -38,6 +38,18 @@ void RCTEnableImageLoadingPerfInstrumentation(BOOL enabled)
|
|||
imagePerfInstrumentationEnabled = enabled;
|
||||
}
|
||||
|
||||
static BOOL (^getImagePerfInstrumentationForFabricEnabled)() = (^BOOL () {
|
||||
return NO;
|
||||
});
|
||||
|
||||
BOOL RCTGetImageLoadingPerfInstrumentationForFabricEnabled() {
|
||||
return getImagePerfInstrumentationForFabricEnabled();
|
||||
}
|
||||
|
||||
void RCTSetImageLoadingPerfInstrumentationForFabricEnabledBlock(BOOL (^getMobileConfigEnabled)()) {
|
||||
getImagePerfInstrumentationForFabricEnabled = getMobileConfigEnabled;
|
||||
}
|
||||
|
||||
static NSInteger RCTImageBytesForImage(UIImage *image)
|
||||
{
|
||||
NSInteger singleImageBytes = image.size.width * image.size.height * image.scale * image.scale * 4;
|
||||
|
|
|
@ -16,6 +16,9 @@ RCT_EXTERN BOOL RCTImageLoadingPerfInstrumentationEnabled(void);
|
|||
RCT_EXTERN void RCTEnableImageLoadingInstrumentation(BOOL enabled);
|
||||
RCT_EXTERN void RCTEnableImageLoadingPerfInstrumentation(BOOL enabled);
|
||||
|
||||
RCT_EXTERN BOOL RCTGetImageLoadingPerfInstrumentationForFabricEnabled();
|
||||
RCT_EXTERN void RCTSetImageLoadingPerfInstrumentationForFabricEnabledBlock(BOOL (^getEnabled)());
|
||||
|
||||
@protocol RCTImageLoaderWithAttributionProtocol<RCTImageLoaderProtocol, RCTImageLoaderInstrumentableProtocol>
|
||||
|
||||
// TODO (T61325135): Remove C++ checks
|
||||
|
|
Загрузка…
Ссылка в новой задаче