mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45394 Changelog: [Internal] The current `Image` implementation does not support loading [vector drawables](https://developer.android.com/develop/ui/views/graphics/vector-drawable-resources) on Android, and support has been requested many times ([issue](https://github.com/facebook/react-native/issues/16651), [issue](https://github.com/facebook/react-native/issues/27502)). I am proposing to put support behind this feature flag in order to validate against performance regressions. Adding support will require reading files from disk to determine if the resource is actually an XML file. Reviewed By: cortinico Differential Revision: D59647903 fbshipit-source-id: 2445d71b6769266abe4c2dda521cc2be89bf4064
159 lines
4.8 KiB
C++
159 lines
4.8 KiB
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @generated SignedSource<<19c9de459447304ed033bdef70cd2cdf>>
|
|
*/
|
|
|
|
/**
|
|
* IMPORTANT: Do NOT modify this file directly.
|
|
*
|
|
* To change the definition of the flags, edit
|
|
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js.
|
|
*
|
|
* To regenerate this code, run the following script from the repo root:
|
|
* yarn featureflags-update
|
|
*/
|
|
|
|
#include "ReactNativeFeatureFlags.h"
|
|
|
|
namespace facebook::react {
|
|
|
|
bool ReactNativeFeatureFlags::commonTestFlag() {
|
|
return getAccessor().commonTestFlag();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::allowCollapsableChildren() {
|
|
return getAccessor().allowCollapsableChildren();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::allowRecursiveCommitsWithSynchronousMountOnAndroid() {
|
|
return getAccessor().allowRecursiveCommitsWithSynchronousMountOnAndroid();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop() {
|
|
return getAccessor().batchRenderingUpdatesInEventLoop();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::destroyFabricSurfacesInReactInstanceManager() {
|
|
return getAccessor().destroyFabricSurfacesInReactInstanceManager();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::enableAlignItemsBaselineOnFabricIOS() {
|
|
return getAccessor().enableAlignItemsBaselineOnFabricIOS();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::enableCleanTextInputYogaNode() {
|
|
return getAccessor().enableCleanTextInputYogaNode();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::enableGranularShadowTreeStateReconciliation() {
|
|
return getAccessor().enableGranularShadowTreeStateReconciliation();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::enableMicrotasks() {
|
|
return getAccessor().enableMicrotasks();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::enableSynchronousStateUpdates() {
|
|
return getAccessor().enableSynchronousStateUpdates();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::enableUIConsistency() {
|
|
return getAccessor().enableUIConsistency();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::fetchImagesInViewPreallocation() {
|
|
return getAccessor().fetchImagesInViewPreallocation();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::fixIncorrectScrollViewStateUpdateOnAndroid() {
|
|
return getAccessor().fixIncorrectScrollViewStateUpdateOnAndroid();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact() {
|
|
return getAccessor().fixMappingOfEventPrioritiesBetweenFabricAndReact();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::fixMissedFabricStateUpdatesOnAndroid() {
|
|
return getAccessor().fixMissedFabricStateUpdatesOnAndroid();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::forceBatchingMountItemsOnAndroid() {
|
|
return getAccessor().forceBatchingMountItemsOnAndroid();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::fuseboxEnabledDebug() {
|
|
return getAccessor().fuseboxEnabledDebug();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::fuseboxEnabledRelease() {
|
|
return getAccessor().fuseboxEnabledRelease();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::initEagerTurboModulesOnNativeModulesQueueAndroid() {
|
|
return getAccessor().initEagerTurboModulesOnNativeModulesQueueAndroid();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::lazyAnimationCallbacks() {
|
|
return getAccessor().lazyAnimationCallbacks();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::loadVectorDrawablesOnImages() {
|
|
return getAccessor().loadVectorDrawablesOnImages();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::setAndroidLayoutDirection() {
|
|
return getAccessor().setAndroidLayoutDirection();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::useImmediateExecutorInAndroidBridgeless() {
|
|
return getAccessor().useImmediateExecutorInAndroidBridgeless();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::useModernRuntimeScheduler() {
|
|
return getAccessor().useModernRuntimeScheduler();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode() {
|
|
return getAccessor().useNativeViewConfigsInBridgelessMode();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::useNewReactImageViewBackgroundDrawing() {
|
|
return getAccessor().useNewReactImageViewBackgroundDrawing();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdate() {
|
|
return getAccessor().useRuntimeShadowNodeReferenceUpdate();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdateOnLayout() {
|
|
return getAccessor().useRuntimeShadowNodeReferenceUpdateOnLayout();
|
|
}
|
|
|
|
bool ReactNativeFeatureFlags::useStateAlignmentMechanism() {
|
|
return getAccessor().useStateAlignmentMechanism();
|
|
}
|
|
|
|
void ReactNativeFeatureFlags::override(
|
|
std::unique_ptr<ReactNativeFeatureFlagsProvider> provider) {
|
|
getAccessor().override(std::move(provider));
|
|
}
|
|
|
|
void ReactNativeFeatureFlags::dangerouslyReset() {
|
|
getAccessor(true);
|
|
}
|
|
|
|
ReactNativeFeatureFlagsAccessor& ReactNativeFeatureFlags::getAccessor(
|
|
bool reset) {
|
|
static std::unique_ptr<ReactNativeFeatureFlagsAccessor> accessor;
|
|
if (accessor == nullptr || reset) {
|
|
accessor = std::make_unique<ReactNativeFeatureFlagsAccessor>();
|
|
}
|
|
return *accessor;
|
|
}
|
|
|
|
} // namespace facebook::react
|