From 267b2506904f8155cb1a460a970ec4cf877c91d3 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Tue, 1 Oct 2024 12:46:29 -0700 Subject: [PATCH] Cleanup background drawing feature flags (#46761) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46761 The legacy paths for this is all gone and non functional. We can clean thes up fully now. Changelog: [Internal] Reviewed By: rshest, Abbondanzo Differential Revision: D63652264 fbshipit-source-id: cabc1af0098553c64f834e6bc30000ef7a942a4c --- .../featureflags/ReactNativeFeatureFlags.kt | 14 +- .../ReactNativeFeatureFlagsCxxAccessor.kt | 22 +--- .../ReactNativeFeatureFlagsCxxInterop.kt | 6 +- .../ReactNativeFeatureFlagsDefaults.kt | 6 +- .../ReactNativeFeatureFlagsLocalAccessor.kt | 24 +--- .../ReactNativeFeatureFlagsProvider.kt | 6 +- .../react/uimanager/BaseViewManager.java | 23 +--- .../JReactNativeFeatureFlagsCxxInterop.cpp | 30 +---- .../JReactNativeFeatureFlagsCxxInterop.h | 8 +- .../featureflags/ReactNativeFeatureFlags.cpp | 10 +- .../featureflags/ReactNativeFeatureFlags.h | 12 +- .../ReactNativeFeatureFlagsAccessor.cpp | 124 +++++++----------- .../ReactNativeFeatureFlagsAccessor.h | 8 +- .../ReactNativeFeatureFlagsDefaults.h | 10 +- .../ReactNativeFeatureFlagsProvider.h | 4 +- .../NativeReactNativeFeatureFlags.cpp | 12 +- .../NativeReactNativeFeatureFlags.h | 6 +- .../ReactNativeFeatureFlags.config.js | 18 --- .../featureflags/ReactNativeFeatureFlags.js | 12 +- .../specs/NativeReactNativeFeatureFlags.js | 4 +- 20 files changed, 69 insertions(+), 290 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt index 132a9ea38c8..32e2f13c985 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<346573dc832f9de6a2e29a4cfde558c5>> + * @generated SignedSource<> */ /** @@ -70,12 +70,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun enableAndroidLineHeightCentering(): Boolean = accessor.enableAndroidLineHeightCentering() - /** - * Use BackgroundStyleApplicator in place of other background/border drawing code - */ - @JvmStatic - public fun enableBackgroundStyleApplicator(): Boolean = accessor.enableBackgroundStyleApplicator() - /** * Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer. */ @@ -298,12 +292,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun useNativeViewConfigsInBridgelessMode(): Boolean = accessor.useNativeViewConfigsInBridgelessMode() - /** - * Use shared background drawing code for ReactImageView instead of using Fresco to manipulate the bitmap - */ - @JvmStatic - public fun useNewReactImageViewBackgroundDrawing(): Boolean = accessor.useNewReactImageViewBackgroundDrawing() - /** * Moves more of the work in view preallocation to the main thread to free up JS thread. */ diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt index 7be1e9c12c7..263acc9faef 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<71fd4a070f4eb1429f38221e34135062>> + * @generated SignedSource<<09ac6b8a5ba873a85e861e54f49072b4>> */ /** @@ -27,7 +27,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null private var enableAlignItemsBaselineOnFabricIOSCache: Boolean? = null private var enableAndroidLineHeightCenteringCache: Boolean? = null - private var enableBackgroundStyleApplicatorCache: Boolean? = null private var enableBridgelessArchitectureCache: Boolean? = null private var enableCleanTextInputYogaNodeCache: Boolean? = null private var enableDeletionOfUnmountedViewsCache: Boolean? = null @@ -65,7 +64,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso private var useImmediateExecutorInAndroidBridgelessCache: Boolean? = null private var useModernRuntimeSchedulerCache: Boolean? = null private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null - private var useNewReactImageViewBackgroundDrawingCache: Boolean? = null private var useOptimisedViewPreallocationOnAndroidCache: Boolean? = null private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null private var useRuntimeShadowNodeReferenceUpdateCache: Boolean? = null @@ -136,15 +134,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso return cached } - override fun enableBackgroundStyleApplicator(): Boolean { - var cached = enableBackgroundStyleApplicatorCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.enableBackgroundStyleApplicator() - enableBackgroundStyleApplicatorCache = cached - } - return cached - } - override fun enableBridgelessArchitecture(): Boolean { var cached = enableBridgelessArchitectureCache if (cached == null) { @@ -478,15 +467,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso return cached } - override fun useNewReactImageViewBackgroundDrawing(): Boolean { - var cached = useNewReactImageViewBackgroundDrawingCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.useNewReactImageViewBackgroundDrawing() - useNewReactImageViewBackgroundDrawingCache = cached - } - return cached - } - override fun useOptimisedViewPreallocationOnAndroid(): Boolean { var cached = useOptimisedViewPreallocationOnAndroidCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt index 4f7bf4b3cd0..eb6323b5770 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<4ad77e7f64acc11e5a5f867f94d84b46>> */ /** @@ -42,8 +42,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun enableAndroidLineHeightCentering(): Boolean - @DoNotStrip @JvmStatic public external fun enableBackgroundStyleApplicator(): Boolean - @DoNotStrip @JvmStatic public external fun enableBridgelessArchitecture(): Boolean @DoNotStrip @JvmStatic public external fun enableCleanTextInputYogaNode(): Boolean @@ -118,8 +116,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun useNativeViewConfigsInBridgelessMode(): Boolean - @DoNotStrip @JvmStatic public external fun useNewReactImageViewBackgroundDrawing(): Boolean - @DoNotStrip @JvmStatic public external fun useOptimisedViewPreallocationOnAndroid(): Boolean @DoNotStrip @JvmStatic public external fun useOptimizedEventBatchingOnAndroid(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt index 0c79691e071..9a5b5da8ab1 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> */ /** @@ -37,8 +37,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun enableAndroidLineHeightCentering(): Boolean = false - override fun enableBackgroundStyleApplicator(): Boolean = true - override fun enableBridgelessArchitecture(): Boolean = false override fun enableCleanTextInputYogaNode(): Boolean = false @@ -113,8 +111,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun useNativeViewConfigsInBridgelessMode(): Boolean = false - override fun useNewReactImageViewBackgroundDrawing(): Boolean = false - override fun useOptimisedViewPreallocationOnAndroid(): Boolean = false override fun useOptimizedEventBatchingOnAndroid(): Boolean = false diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt index 9b32b5f115f..2b7fba23b51 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<0d8f65a06ed20f44e5de58b764635602>> + * @generated SignedSource<> */ /** @@ -31,7 +31,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null private var enableAlignItemsBaselineOnFabricIOSCache: Boolean? = null private var enableAndroidLineHeightCenteringCache: Boolean? = null - private var enableBackgroundStyleApplicatorCache: Boolean? = null private var enableBridgelessArchitectureCache: Boolean? = null private var enableCleanTextInputYogaNodeCache: Boolean? = null private var enableDeletionOfUnmountedViewsCache: Boolean? = null @@ -69,7 +68,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces private var useImmediateExecutorInAndroidBridgelessCache: Boolean? = null private var useModernRuntimeSchedulerCache: Boolean? = null private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null - private var useNewReactImageViewBackgroundDrawingCache: Boolean? = null private var useOptimisedViewPreallocationOnAndroidCache: Boolean? = null private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null private var useRuntimeShadowNodeReferenceUpdateCache: Boolean? = null @@ -147,16 +145,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun enableBackgroundStyleApplicator(): Boolean { - var cached = enableBackgroundStyleApplicatorCache - if (cached == null) { - cached = currentProvider.enableBackgroundStyleApplicator() - accessedFeatureFlags.add("enableBackgroundStyleApplicator") - enableBackgroundStyleApplicatorCache = cached - } - return cached - } - override fun enableBridgelessArchitecture(): Boolean { var cached = enableBridgelessArchitectureCache if (cached == null) { @@ -527,16 +515,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun useNewReactImageViewBackgroundDrawing(): Boolean { - var cached = useNewReactImageViewBackgroundDrawingCache - if (cached == null) { - cached = currentProvider.useNewReactImageViewBackgroundDrawing() - accessedFeatureFlags.add("useNewReactImageViewBackgroundDrawing") - useNewReactImageViewBackgroundDrawingCache = cached - } - return cached - } - override fun useOptimisedViewPreallocationOnAndroid(): Boolean { var cached = useOptimisedViewPreallocationOnAndroidCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt index e067e1e1adc..8f5a22b9179 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<6d70976da58a1120c79704210899b893>> + * @generated SignedSource<> */ /** @@ -37,8 +37,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun enableAndroidLineHeightCentering(): Boolean - @DoNotStrip public fun enableBackgroundStyleApplicator(): Boolean - @DoNotStrip public fun enableBridgelessArchitecture(): Boolean @DoNotStrip public fun enableCleanTextInputYogaNode(): Boolean @@ -113,8 +111,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun useNativeViewConfigsInBridgelessMode(): Boolean - @DoNotStrip public fun useNewReactImageViewBackgroundDrawing(): Boolean - @DoNotStrip public fun useOptimisedViewPreallocationOnAndroid(): Boolean @DoNotStrip public fun useOptimizedEventBatchingOnAndroid(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java index 2256d5889b3..e101ad960d6 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java @@ -27,7 +27,6 @@ import com.facebook.react.bridge.ReadableMapKeySetIterator; import com.facebook.react.bridge.ReadableType; import com.facebook.react.common.MapBuilder; import com.facebook.react.common.ReactConstants; -import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags; import com.facebook.react.uimanager.ReactAccessibilityDelegate.AccessibilityRole; import com.facebook.react.uimanager.ReactAccessibilityDelegate.Role; import com.facebook.react.uimanager.annotations.ReactProp; @@ -789,33 +788,25 @@ public abstract class BaseViewManager> + * @generated SignedSource<> */ /** @@ -81,12 +81,6 @@ class ReactNativeFeatureFlagsProviderHolder return method(javaProvider_); } - bool enableBackgroundStyleApplicator() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("enableBackgroundStyleApplicator"); - return method(javaProvider_); - } - bool enableBridgelessArchitecture() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("enableBridgelessArchitecture"); @@ -309,12 +303,6 @@ class ReactNativeFeatureFlagsProviderHolder return method(javaProvider_); } - bool useNewReactImageViewBackgroundDrawing() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("useNewReactImageViewBackgroundDrawing"); - return method(javaProvider_); - } - bool useOptimisedViewPreallocationOnAndroid() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("useOptimisedViewPreallocationOnAndroid"); @@ -390,11 +378,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableAndroidLineHeightCentering( return ReactNativeFeatureFlags::enableAndroidLineHeightCentering(); } -bool JReactNativeFeatureFlagsCxxInterop::enableBackgroundStyleApplicator( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::enableBackgroundStyleApplicator(); -} - bool JReactNativeFeatureFlagsCxxInterop::enableBridgelessArchitecture( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::enableBridgelessArchitecture(); @@ -580,11 +563,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode( return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode(); } -bool JReactNativeFeatureFlagsCxxInterop::useNewReactImageViewBackgroundDrawing( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::useNewReactImageViewBackgroundDrawing(); -} - bool JReactNativeFeatureFlagsCxxInterop::useOptimisedViewPreallocationOnAndroid( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::useOptimisedViewPreallocationOnAndroid(); @@ -653,9 +631,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "enableAndroidLineHeightCentering", JReactNativeFeatureFlagsCxxInterop::enableAndroidLineHeightCentering), - makeNativeMethod( - "enableBackgroundStyleApplicator", - JReactNativeFeatureFlagsCxxInterop::enableBackgroundStyleApplicator), makeNativeMethod( "enableBridgelessArchitecture", JReactNativeFeatureFlagsCxxInterop::enableBridgelessArchitecture), @@ -767,9 +742,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "useNativeViewConfigsInBridgelessMode", JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode), - makeNativeMethod( - "useNewReactImageViewBackgroundDrawing", - JReactNativeFeatureFlagsCxxInterop::useNewReactImageViewBackgroundDrawing), makeNativeMethod( "useOptimisedViewPreallocationOnAndroid", JReactNativeFeatureFlagsCxxInterop::useOptimisedViewPreallocationOnAndroid), diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h index 4551665e269..4c17613be34 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<9514754227bf797622d6085de2470a86>> */ /** @@ -51,9 +51,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool enableAndroidLineHeightCentering( facebook::jni::alias_ref); - static bool enableBackgroundStyleApplicator( - facebook::jni::alias_ref); - static bool enableBridgelessArchitecture( facebook::jni::alias_ref); @@ -165,9 +162,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool useNativeViewConfigsInBridgelessMode( facebook::jni::alias_ref); - static bool useNewReactImageViewBackgroundDrawing( - facebook::jni::alias_ref); - static bool useOptimisedViewPreallocationOnAndroid( facebook::jni::alias_ref); diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp index 4639b5642b5..ab4609b8ac0 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<4efee607ab3716723debee8a451604ef>> + * @generated SignedSource<<844f004ddce387b7e65bd6e551f566fa>> */ /** @@ -49,10 +49,6 @@ bool ReactNativeFeatureFlags::enableAndroidLineHeightCentering() { return getAccessor().enableAndroidLineHeightCentering(); } -bool ReactNativeFeatureFlags::enableBackgroundStyleApplicator() { - return getAccessor().enableBackgroundStyleApplicator(); -} - bool ReactNativeFeatureFlags::enableBridgelessArchitecture() { return getAccessor().enableBridgelessArchitecture(); } @@ -201,10 +197,6 @@ bool ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode() { return getAccessor().useNativeViewConfigsInBridgelessMode(); } -bool ReactNativeFeatureFlags::useNewReactImageViewBackgroundDrawing() { - return getAccessor().useNewReactImageViewBackgroundDrawing(); -} - bool ReactNativeFeatureFlags::useOptimisedViewPreallocationOnAndroid() { return getAccessor().useOptimisedViewPreallocationOnAndroid(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index 0b15e28466c..4296b96042f 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<284402d1a83bfc5e8ae0a4619c61e130>> */ /** @@ -72,11 +72,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool enableAndroidLineHeightCentering(); - /** - * Use BackgroundStyleApplicator in place of other background/border drawing code - */ - RN_EXPORT static bool enableBackgroundStyleApplicator(); - /** * Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer. */ @@ -262,11 +257,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool useNativeViewConfigsInBridgelessMode(); - /** - * Use shared background drawing code for ReactImageView instead of using Fresco to manipulate the bitmap - */ - RN_EXPORT static bool useNewReactImageViewBackgroundDrawing(); - /** * Moves more of the work in view preallocation to the main thread to free up JS thread. */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index 9f9fd6eac76..1b99eef1ce5 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<1bbb59bff4ce77b34ee94d0a2095d71f>> + * @generated SignedSource<<4b891cd3ef89b709046557282f13cefc>> */ /** @@ -155,24 +155,6 @@ bool ReactNativeFeatureFlagsAccessor::enableAndroidLineHeightCentering() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::enableBackgroundStyleApplicator() { - auto flagValue = enableBackgroundStyleApplicator_.load(); - - if (!flagValue.has_value()) { - // This block is not exclusive but it is not necessary. - // If multiple threads try to initialize the feature flag, we would only - // be accessing the provider multiple times but the end state of this - // instance and the returned flag value would be the same. - - markFlagAsAccessed(7, "enableBackgroundStyleApplicator"); - - flagValue = currentProvider_->enableBackgroundStyleApplicator(); - enableBackgroundStyleApplicator_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::enableBridgelessArchitecture() { auto flagValue = enableBridgelessArchitecture_.load(); @@ -182,7 +164,7 @@ bool ReactNativeFeatureFlagsAccessor::enableBridgelessArchitecture() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(8, "enableBridgelessArchitecture"); + markFlagAsAccessed(7, "enableBridgelessArchitecture"); flagValue = currentProvider_->enableBridgelessArchitecture(); enableBridgelessArchitecture_ = flagValue; @@ -200,7 +182,7 @@ bool ReactNativeFeatureFlagsAccessor::enableCleanTextInputYogaNode() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(9, "enableCleanTextInputYogaNode"); + markFlagAsAccessed(8, "enableCleanTextInputYogaNode"); flagValue = currentProvider_->enableCleanTextInputYogaNode(); enableCleanTextInputYogaNode_ = flagValue; @@ -218,7 +200,7 @@ bool ReactNativeFeatureFlagsAccessor::enableDeletionOfUnmountedViews() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(10, "enableDeletionOfUnmountedViews"); + markFlagAsAccessed(9, "enableDeletionOfUnmountedViews"); flagValue = currentProvider_->enableDeletionOfUnmountedViews(); enableDeletionOfUnmountedViews_ = flagValue; @@ -236,7 +218,7 @@ bool ReactNativeFeatureFlagsAccessor::enableEagerRootViewAttachment() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(11, "enableEagerRootViewAttachment"); + markFlagAsAccessed(10, "enableEagerRootViewAttachment"); flagValue = currentProvider_->enableEagerRootViewAttachment(); enableEagerRootViewAttachment_ = flagValue; @@ -254,7 +236,7 @@ bool ReactNativeFeatureFlagsAccessor::enableEventEmitterRetentionDuringGesturesO // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(12, "enableEventEmitterRetentionDuringGesturesOnAndroid"); + markFlagAsAccessed(11, "enableEventEmitterRetentionDuringGesturesOnAndroid"); flagValue = currentProvider_->enableEventEmitterRetentionDuringGesturesOnAndroid(); enableEventEmitterRetentionDuringGesturesOnAndroid_ = flagValue; @@ -272,7 +254,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricLogs() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(13, "enableFabricLogs"); + markFlagAsAccessed(12, "enableFabricLogs"); flagValue = currentProvider_->enableFabricLogs(); enableFabricLogs_ = flagValue; @@ -290,7 +272,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricRenderer() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(14, "enableFabricRenderer"); + markFlagAsAccessed(13, "enableFabricRenderer"); flagValue = currentProvider_->enableFabricRenderer(); enableFabricRenderer_ = flagValue; @@ -308,7 +290,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricRendererExclusively() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(15, "enableFabricRendererExclusively"); + markFlagAsAccessed(14, "enableFabricRendererExclusively"); flagValue = currentProvider_->enableFabricRendererExclusively(); enableFabricRendererExclusively_ = flagValue; @@ -326,7 +308,7 @@ bool ReactNativeFeatureFlagsAccessor::enableGranularShadowTreeStateReconciliatio // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(16, "enableGranularShadowTreeStateReconciliation"); + markFlagAsAccessed(15, "enableGranularShadowTreeStateReconciliation"); flagValue = currentProvider_->enableGranularShadowTreeStateReconciliation(); enableGranularShadowTreeStateReconciliation_ = flagValue; @@ -344,7 +326,7 @@ bool ReactNativeFeatureFlagsAccessor::enableIOSViewClipToPaddingBox() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(17, "enableIOSViewClipToPaddingBox"); + markFlagAsAccessed(16, "enableIOSViewClipToPaddingBox"); flagValue = currentProvider_->enableIOSViewClipToPaddingBox(); enableIOSViewClipToPaddingBox_ = flagValue; @@ -362,7 +344,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnIOS() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(18, "enableLayoutAnimationsOnIOS"); + markFlagAsAccessed(17, "enableLayoutAnimationsOnIOS"); flagValue = currentProvider_->enableLayoutAnimationsOnIOS(); enableLayoutAnimationsOnIOS_ = flagValue; @@ -380,7 +362,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLongTaskAPI() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(19, "enableLongTaskAPI"); + markFlagAsAccessed(18, "enableLongTaskAPI"); flagValue = currentProvider_->enableLongTaskAPI(); enableLongTaskAPI_ = flagValue; @@ -398,7 +380,7 @@ bool ReactNativeFeatureFlagsAccessor::enableMicrotasks() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(20, "enableMicrotasks"); + markFlagAsAccessed(19, "enableMicrotasks"); flagValue = currentProvider_->enableMicrotasks(); enableMicrotasks_ = flagValue; @@ -416,7 +398,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePreciseSchedulingForPremountItemsOnA // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(21, "enablePreciseSchedulingForPremountItemsOnAndroid"); + markFlagAsAccessed(20, "enablePreciseSchedulingForPremountItemsOnAndroid"); flagValue = currentProvider_->enablePreciseSchedulingForPremountItemsOnAndroid(); enablePreciseSchedulingForPremountItemsOnAndroid_ = flagValue; @@ -434,7 +416,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePropsUpdateReconciliationAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(22, "enablePropsUpdateReconciliationAndroid"); + markFlagAsAccessed(21, "enablePropsUpdateReconciliationAndroid"); flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid(); enablePropsUpdateReconciliationAndroid_ = flagValue; @@ -452,7 +434,7 @@ bool ReactNativeFeatureFlagsAccessor::enableReportEventPaintTime() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(23, "enableReportEventPaintTime"); + markFlagAsAccessed(22, "enableReportEventPaintTime"); flagValue = currentProvider_->enableReportEventPaintTime(); enableReportEventPaintTime_ = flagValue; @@ -470,7 +452,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSynchronousStateUpdates() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(24, "enableSynchronousStateUpdates"); + markFlagAsAccessed(23, "enableSynchronousStateUpdates"); flagValue = currentProvider_->enableSynchronousStateUpdates(); enableSynchronousStateUpdates_ = flagValue; @@ -488,7 +470,7 @@ bool ReactNativeFeatureFlagsAccessor::enableTextPreallocationOptimisation() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(25, "enableTextPreallocationOptimisation"); + markFlagAsAccessed(24, "enableTextPreallocationOptimisation"); flagValue = currentProvider_->enableTextPreallocationOptimisation(); enableTextPreallocationOptimisation_ = flagValue; @@ -506,7 +488,7 @@ bool ReactNativeFeatureFlagsAccessor::enableUIConsistency() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(26, "enableUIConsistency"); + markFlagAsAccessed(25, "enableUIConsistency"); flagValue = currentProvider_->enableUIConsistency(); enableUIConsistency_ = flagValue; @@ -524,7 +506,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecycling() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(27, "enableViewRecycling"); + markFlagAsAccessed(26, "enableViewRecycling"); flagValue = currentProvider_->enableViewRecycling(); enableViewRecycling_ = flagValue; @@ -542,7 +524,7 @@ bool ReactNativeFeatureFlagsAccessor::excludeYogaFromRawProps() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(28, "excludeYogaFromRawProps"); + markFlagAsAccessed(27, "excludeYogaFromRawProps"); flagValue = currentProvider_->excludeYogaFromRawProps(); excludeYogaFromRawProps_ = flagValue; @@ -560,7 +542,7 @@ bool ReactNativeFeatureFlagsAccessor::fetchImagesInViewPreallocation() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(29, "fetchImagesInViewPreallocation"); + markFlagAsAccessed(28, "fetchImagesInViewPreallocation"); flagValue = currentProvider_->fetchImagesInViewPreallocation(); fetchImagesInViewPreallocation_ = flagValue; @@ -578,7 +560,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMappingOfEventPrioritiesBetweenFabricAn // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(30, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); + markFlagAsAccessed(29, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact(); fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue; @@ -596,7 +578,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMountingCoordinatorReportedPendingTrans // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(31, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid"); + markFlagAsAccessed(30, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid"); flagValue = currentProvider_->fixMountingCoordinatorReportedPendingTransactionsOnAndroid(); fixMountingCoordinatorReportedPendingTransactionsOnAndroid_ = flagValue; @@ -614,7 +596,7 @@ bool ReactNativeFeatureFlagsAccessor::forceBatchingMountItemsOnAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(32, "forceBatchingMountItemsOnAndroid"); + markFlagAsAccessed(31, "forceBatchingMountItemsOnAndroid"); flagValue = currentProvider_->forceBatchingMountItemsOnAndroid(); forceBatchingMountItemsOnAndroid_ = flagValue; @@ -632,7 +614,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxEnabledDebug() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(33, "fuseboxEnabledDebug"); + markFlagAsAccessed(32, "fuseboxEnabledDebug"); flagValue = currentProvider_->fuseboxEnabledDebug(); fuseboxEnabledDebug_ = flagValue; @@ -650,7 +632,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxEnabledRelease() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(34, "fuseboxEnabledRelease"); + markFlagAsAccessed(33, "fuseboxEnabledRelease"); flagValue = currentProvider_->fuseboxEnabledRelease(); fuseboxEnabledRelease_ = flagValue; @@ -668,7 +650,7 @@ bool ReactNativeFeatureFlagsAccessor::initEagerTurboModulesOnNativeModulesQueueA // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(35, "initEagerTurboModulesOnNativeModulesQueueAndroid"); + markFlagAsAccessed(34, "initEagerTurboModulesOnNativeModulesQueueAndroid"); flagValue = currentProvider_->initEagerTurboModulesOnNativeModulesQueueAndroid(); initEagerTurboModulesOnNativeModulesQueueAndroid_ = flagValue; @@ -686,7 +668,7 @@ bool ReactNativeFeatureFlagsAccessor::lazyAnimationCallbacks() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(36, "lazyAnimationCallbacks"); + markFlagAsAccessed(35, "lazyAnimationCallbacks"); flagValue = currentProvider_->lazyAnimationCallbacks(); lazyAnimationCallbacks_ = flagValue; @@ -704,7 +686,7 @@ bool ReactNativeFeatureFlagsAccessor::loadVectorDrawablesOnImages() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(37, "loadVectorDrawablesOnImages"); + markFlagAsAccessed(36, "loadVectorDrawablesOnImages"); flagValue = currentProvider_->loadVectorDrawablesOnImages(); loadVectorDrawablesOnImages_ = flagValue; @@ -722,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::removeNestedCallsToDispatchMountItemsOnAnd // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(38, "removeNestedCallsToDispatchMountItemsOnAndroid"); + markFlagAsAccessed(37, "removeNestedCallsToDispatchMountItemsOnAndroid"); flagValue = currentProvider_->removeNestedCallsToDispatchMountItemsOnAndroid(); removeNestedCallsToDispatchMountItemsOnAndroid_ = flagValue; @@ -740,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::setAndroidLayoutDirection() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(39, "setAndroidLayoutDirection"); + markFlagAsAccessed(38, "setAndroidLayoutDirection"); flagValue = currentProvider_->setAndroidLayoutDirection(); setAndroidLayoutDirection_ = flagValue; @@ -758,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(40, "traceTurboModulePromiseRejectionsOnAndroid"); + markFlagAsAccessed(39, "traceTurboModulePromiseRejectionsOnAndroid"); flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid(); traceTurboModulePromiseRejectionsOnAndroid_ = flagValue; @@ -776,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(41, "useFabricInterop"); + markFlagAsAccessed(40, "useFabricInterop"); flagValue = currentProvider_->useFabricInterop(); useFabricInterop_ = flagValue; @@ -794,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::useImmediateExecutorInAndroidBridgeless() // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(42, "useImmediateExecutorInAndroidBridgeless"); + markFlagAsAccessed(41, "useImmediateExecutorInAndroidBridgeless"); flagValue = currentProvider_->useImmediateExecutorInAndroidBridgeless(); useImmediateExecutorInAndroidBridgeless_ = flagValue; @@ -812,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::useModernRuntimeScheduler() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(43, "useModernRuntimeScheduler"); + markFlagAsAccessed(42, "useModernRuntimeScheduler"); flagValue = currentProvider_->useModernRuntimeScheduler(); useModernRuntimeScheduler_ = flagValue; @@ -830,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(44, "useNativeViewConfigsInBridgelessMode"); + markFlagAsAccessed(43, "useNativeViewConfigsInBridgelessMode"); flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode(); useNativeViewConfigsInBridgelessMode_ = flagValue; @@ -839,24 +821,6 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::useNewReactImageViewBackgroundDrawing() { - auto flagValue = useNewReactImageViewBackgroundDrawing_.load(); - - if (!flagValue.has_value()) { - // This block is not exclusive but it is not necessary. - // If multiple threads try to initialize the feature flag, we would only - // be accessing the provider multiple times but the end state of this - // instance and the returned flag value would be the same. - - markFlagAsAccessed(45, "useNewReactImageViewBackgroundDrawing"); - - flagValue = currentProvider_->useNewReactImageViewBackgroundDrawing(); - useNewReactImageViewBackgroundDrawing_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::useOptimisedViewPreallocationOnAndroid() { auto flagValue = useOptimisedViewPreallocationOnAndroid_.load(); @@ -866,7 +830,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimisedViewPreallocationOnAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(46, "useOptimisedViewPreallocationOnAndroid"); + markFlagAsAccessed(44, "useOptimisedViewPreallocationOnAndroid"); flagValue = currentProvider_->useOptimisedViewPreallocationOnAndroid(); useOptimisedViewPreallocationOnAndroid_ = flagValue; @@ -884,7 +848,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(47, "useOptimizedEventBatchingOnAndroid"); + markFlagAsAccessed(45, "useOptimizedEventBatchingOnAndroid"); flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid(); useOptimizedEventBatchingOnAndroid_ = flagValue; @@ -902,7 +866,7 @@ bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdate() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(48, "useRuntimeShadowNodeReferenceUpdate"); + markFlagAsAccessed(46, "useRuntimeShadowNodeReferenceUpdate"); flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdate(); useRuntimeShadowNodeReferenceUpdate_ = flagValue; @@ -920,7 +884,7 @@ bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdateOnLayou // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(49, "useRuntimeShadowNodeReferenceUpdateOnLayout"); + markFlagAsAccessed(47, "useRuntimeShadowNodeReferenceUpdateOnLayout"); flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdateOnLayout(); useRuntimeShadowNodeReferenceUpdateOnLayout_ = flagValue; @@ -938,7 +902,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(50, "useTurboModuleInterop"); + markFlagAsAccessed(48, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -956,7 +920,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(51, "useTurboModules"); + markFlagAsAccessed(49, "useTurboModules"); flagValue = currentProvider_->useTurboModules(); useTurboModules_ = flagValue; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index f4ce287fddd..c5b7fd78f4b 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<5c64457d2fbe154d7e57b3e3e2e6a33a>> + * @generated SignedSource<<84feecb4e94dfdc9fe6bd7ebb9d5a6de>> */ /** @@ -38,7 +38,6 @@ class ReactNativeFeatureFlagsAccessor { bool destroyFabricSurfacesInReactInstanceManager(); bool enableAlignItemsBaselineOnFabricIOS(); bool enableAndroidLineHeightCentering(); - bool enableBackgroundStyleApplicator(); bool enableBridgelessArchitecture(); bool enableCleanTextInputYogaNode(); bool enableDeletionOfUnmountedViews(); @@ -76,7 +75,6 @@ class ReactNativeFeatureFlagsAccessor { bool useImmediateExecutorInAndroidBridgeless(); bool useModernRuntimeScheduler(); bool useNativeViewConfigsInBridgelessMode(); - bool useNewReactImageViewBackgroundDrawing(); bool useOptimisedViewPreallocationOnAndroid(); bool useOptimizedEventBatchingOnAndroid(); bool useRuntimeShadowNodeReferenceUpdate(); @@ -93,7 +91,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 52> accessedFeatureFlags_; + std::array, 50> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> allowRecursiveCommitsWithSynchronousMountOnAndroid_; @@ -102,7 +100,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> destroyFabricSurfacesInReactInstanceManager_; std::atomic> enableAlignItemsBaselineOnFabricIOS_; std::atomic> enableAndroidLineHeightCentering_; - std::atomic> enableBackgroundStyleApplicator_; std::atomic> enableBridgelessArchitecture_; std::atomic> enableCleanTextInputYogaNode_; std::atomic> enableDeletionOfUnmountedViews_; @@ -140,7 +137,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> useImmediateExecutorInAndroidBridgeless_; std::atomic> useModernRuntimeScheduler_; std::atomic> useNativeViewConfigsInBridgelessMode_; - std::atomic> useNewReactImageViewBackgroundDrawing_; std::atomic> useOptimisedViewPreallocationOnAndroid_; std::atomic> useOptimizedEventBatchingOnAndroid_; std::atomic> useRuntimeShadowNodeReferenceUpdate_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index 829c443356b..d544420b910 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<001d0b39664b190385442ca8661a08a8>> + * @generated SignedSource<> */ /** @@ -55,10 +55,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool enableBackgroundStyleApplicator() override { - return true; - } - bool enableBridgelessArchitecture() override { return false; } @@ -207,10 +203,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool useNewReactImageViewBackgroundDrawing() override { - return false; - } - bool useOptimisedViewPreallocationOnAndroid() override { return false; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index cca3079662e..33226c7c7e1 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<317288fd521f74c3542457b991373662>> */ /** @@ -32,7 +32,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool destroyFabricSurfacesInReactInstanceManager() = 0; virtual bool enableAlignItemsBaselineOnFabricIOS() = 0; virtual bool enableAndroidLineHeightCentering() = 0; - virtual bool enableBackgroundStyleApplicator() = 0; virtual bool enableBridgelessArchitecture() = 0; virtual bool enableCleanTextInputYogaNode() = 0; virtual bool enableDeletionOfUnmountedViews() = 0; @@ -70,7 +69,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool useImmediateExecutorInAndroidBridgeless() = 0; virtual bool useModernRuntimeScheduler() = 0; virtual bool useNativeViewConfigsInBridgelessMode() = 0; - virtual bool useNewReactImageViewBackgroundDrawing() = 0; virtual bool useOptimisedViewPreallocationOnAndroid() = 0; virtual bool useOptimizedEventBatchingOnAndroid() = 0; virtual bool useRuntimeShadowNodeReferenceUpdate() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index dddc607f100..005c7f739b3 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<74bbe88f1a61cca088a504bb2a1bc19c>> + * @generated SignedSource<> */ /** @@ -72,11 +72,6 @@ bool NativeReactNativeFeatureFlags::enableAndroidLineHeightCentering( return ReactNativeFeatureFlags::enableAndroidLineHeightCentering(); } -bool NativeReactNativeFeatureFlags::enableBackgroundStyleApplicator( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::enableBackgroundStyleApplicator(); -} - bool NativeReactNativeFeatureFlags::enableBridgelessArchitecture( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::enableBridgelessArchitecture(); @@ -262,11 +257,6 @@ bool NativeReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode( return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode(); } -bool NativeReactNativeFeatureFlags::useNewReactImageViewBackgroundDrawing( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::useNewReactImageViewBackgroundDrawing(); -} - bool NativeReactNativeFeatureFlags::useOptimisedViewPreallocationOnAndroid( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::useOptimisedViewPreallocationOnAndroid(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index 2480e5296aa..6c799240587 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<447e801fe9b49d2413d8bfbc106019a0>> + * @generated SignedSource<<9a548d27906a420f179124f97197c25f>> */ /** @@ -49,8 +49,6 @@ class NativeReactNativeFeatureFlags bool enableAndroidLineHeightCentering(jsi::Runtime& runtime); - bool enableBackgroundStyleApplicator(jsi::Runtime& runtime); - bool enableBridgelessArchitecture(jsi::Runtime& runtime); bool enableCleanTextInputYogaNode(jsi::Runtime& runtime); @@ -125,8 +123,6 @@ class NativeReactNativeFeatureFlags bool useNativeViewConfigsInBridgelessMode(jsi::Runtime& runtime); - bool useNewReactImageViewBackgroundDrawing(jsi::Runtime& runtime); - bool useOptimisedViewPreallocationOnAndroid(jsi::Runtime& runtime); bool useOptimizedEventBatchingOnAndroid(jsi::Runtime& runtime); diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 905b7ebcc34..e88b40fefce 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -98,15 +98,6 @@ const definitions: FeatureFlagDefinitions = { purpose: 'experimentation', }, }, - enableBackgroundStyleApplicator: { - defaultValue: true, - metadata: { - dateAdded: '2024-07-29', - description: - 'Use BackgroundStyleApplicator in place of other background/border drawing code', - purpose: 'experimentation', - }, - }, enableBridgelessArchitecture: { defaultValue: false, metadata: { @@ -422,15 +413,6 @@ const definitions: FeatureFlagDefinitions = { purpose: 'experimentation', }, }, - useNewReactImageViewBackgroundDrawing: { - defaultValue: false, - metadata: { - dateAdded: '2024-07-11', - description: - 'Use shared background drawing code for ReactImageView instead of using Fresco to manipulate the bitmap', - purpose: 'experimentation', - }, - }, useOptimisedViewPreallocationOnAndroid: { defaultValue: false, metadata: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 25257e7fdd4..68cd66a4174 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> * @flow strict */ @@ -56,7 +56,6 @@ export type ReactNativeFeatureFlags = { destroyFabricSurfacesInReactInstanceManager: Getter, enableAlignItemsBaselineOnFabricIOS: Getter, enableAndroidLineHeightCentering: Getter, - enableBackgroundStyleApplicator: Getter, enableBridgelessArchitecture: Getter, enableCleanTextInputYogaNode: Getter, enableDeletionOfUnmountedViews: Getter, @@ -94,7 +93,6 @@ export type ReactNativeFeatureFlags = { useImmediateExecutorInAndroidBridgeless: Getter, useModernRuntimeScheduler: Getter, useNativeViewConfigsInBridgelessMode: Getter, - useNewReactImageViewBackgroundDrawing: Getter, useOptimisedViewPreallocationOnAndroid: Getter, useOptimizedEventBatchingOnAndroid: Getter, useRuntimeShadowNodeReferenceUpdate: Getter, @@ -211,10 +209,6 @@ export const enableAlignItemsBaselineOnFabricIOS: Getter = createNative * When enabled, custom line height calculation will be centered from top to bottom. */ export const enableAndroidLineHeightCentering: Getter = createNativeFlagGetter('enableAndroidLineHeightCentering', false); -/** - * Use BackgroundStyleApplicator in place of other background/border drawing code - */ -export const enableBackgroundStyleApplicator: Getter = createNativeFlagGetter('enableBackgroundStyleApplicator', true); /** * Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer. */ @@ -363,10 +357,6 @@ export const useModernRuntimeScheduler: Getter = createNativeFlagGetter * When enabled, the native view configs are used in bridgeless mode. */ export const useNativeViewConfigsInBridgelessMode: Getter = createNativeFlagGetter('useNativeViewConfigsInBridgelessMode', false); -/** - * Use shared background drawing code for ReactImageView instead of using Fresco to manipulate the bitmap - */ -export const useNewReactImageViewBackgroundDrawing: Getter = createNativeFlagGetter('useNewReactImageViewBackgroundDrawing', false); /** * Moves more of the work in view preallocation to the main thread to free up JS thread. */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index d660d549644..fa15ff64bb8 100644 --- a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> * @flow strict */ @@ -30,7 +30,6 @@ export interface Spec extends TurboModule { +destroyFabricSurfacesInReactInstanceManager?: () => boolean; +enableAlignItemsBaselineOnFabricIOS?: () => boolean; +enableAndroidLineHeightCentering?: () => boolean; - +enableBackgroundStyleApplicator?: () => boolean; +enableBridgelessArchitecture?: () => boolean; +enableCleanTextInputYogaNode?: () => boolean; +enableDeletionOfUnmountedViews?: () => boolean; @@ -68,7 +67,6 @@ export interface Spec extends TurboModule { +useImmediateExecutorInAndroidBridgeless?: () => boolean; +useModernRuntimeScheduler?: () => boolean; +useNativeViewConfigsInBridgelessMode?: () => boolean; - +useNewReactImageViewBackgroundDrawing?: () => boolean; +useOptimisedViewPreallocationOnAndroid?: () => boolean; +useOptimizedEventBatchingOnAndroid?: () => boolean; +useRuntimeShadowNodeReferenceUpdate?: () => boolean;