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 3887895e348..47a89ef25e6 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<> + * @generated SignedSource<> */ /** @@ -336,12 +336,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun preventShadowTreeCommitExhaustion(): Boolean = accessor.preventShadowTreeCommitExhaustion() - /** - * Releases the cached image data when it is consumed by the observers. - */ - @JvmStatic - public fun releaseImageDataWhenConsumed(): Boolean = accessor.releaseImageDataWhenConsumed() - /** * Function used to enable / disable Pressibility from using W3C Pointer Events for its hover callbacks */ 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 c62dae26aea..0e74d436129 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<<7dbb21bddd9c2ae447c83923a25372e4>> + * @generated SignedSource<<37203dffb9421d1036aaeaeaa7319e28>> */ /** @@ -71,7 +71,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces private var perfMonitorV2EnabledCache: Boolean? = null private var preparedTextCacheSizeCache: Double? = null private var preventShadowTreeCommitExhaustionCache: Boolean? = null - private var releaseImageDataWhenConsumedCache: Boolean? = null private var shouldPressibilityUseW3CPointerEventsForHoverCache: Boolean? = null private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null private var sweepActiveTouchOnChildNativeGesturesAndroidCache: Boolean? = null @@ -549,15 +548,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun releaseImageDataWhenConsumed(): Boolean { - var cached = releaseImageDataWhenConsumedCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.releaseImageDataWhenConsumed() - releaseImageDataWhenConsumedCache = cached - } - return cached - } - override fun shouldPressibilityUseW3CPointerEventsForHover(): Boolean { var cached = shouldPressibilityUseW3CPointerEventsForHoverCache 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 c197fee37e5..1702ddfcd05 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<<4f93b4eb8f3cb427d3b926ffa18f9f9b>> + * @generated SignedSource<<9c0acc876e3205fe2ea181e71eb512c9>> */ /** @@ -130,8 +130,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun preventShadowTreeCommitExhaustion(): Boolean - @DoNotStrip @JvmStatic public external fun releaseImageDataWhenConsumed(): Boolean - @DoNotStrip @JvmStatic public external fun shouldPressibilityUseW3CPointerEventsForHover(): Boolean @DoNotStrip @JvmStatic public external fun skipActivityIdentityAssertionOnHostPause(): 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 eb4455840e8..73b1b91314d 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<<731176315c5589990865a0995f8b7e20>> + * @generated SignedSource<<05bfed9fc7131062c8b16246986fc999>> */ /** @@ -125,8 +125,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun preventShadowTreeCommitExhaustion(): Boolean = false - override fun releaseImageDataWhenConsumed(): Boolean = false - override fun shouldPressibilityUseW3CPointerEventsForHover(): Boolean = false override fun skipActivityIdentityAssertionOnHostPause(): 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 928411609dc..e6b98e04e65 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<<7af6546cb6e02afcfca90635b3cbe603>> + * @generated SignedSource<<9a18369464f81c3d03f2702716dfdb29>> */ /** @@ -75,7 +75,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc private var perfMonitorV2EnabledCache: Boolean? = null private var preparedTextCacheSizeCache: Double? = null private var preventShadowTreeCommitExhaustionCache: Boolean? = null - private var releaseImageDataWhenConsumedCache: Boolean? = null private var shouldPressibilityUseW3CPointerEventsForHoverCache: Boolean? = null private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null private var sweepActiveTouchOnChildNativeGesturesAndroidCache: Boolean? = null @@ -604,16 +603,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc return cached } - override fun releaseImageDataWhenConsumed(): Boolean { - var cached = releaseImageDataWhenConsumedCache - if (cached == null) { - cached = currentProvider.releaseImageDataWhenConsumed() - accessedFeatureFlags.add("releaseImageDataWhenConsumed") - releaseImageDataWhenConsumedCache = cached - } - return cached - } - override fun shouldPressibilityUseW3CPointerEventsForHover(): Boolean { var cached = shouldPressibilityUseW3CPointerEventsForHoverCache 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 ce33940cffc..56e83f45065 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<<9a982d4167179619629627529916259b>> + * @generated SignedSource<<845b2ee5edc9aedbdbd052d9a930f666>> */ /** @@ -125,8 +125,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun preventShadowTreeCommitExhaustion(): Boolean - @DoNotStrip public fun releaseImageDataWhenConsumed(): Boolean - @DoNotStrip public fun shouldPressibilityUseW3CPointerEventsForHover(): Boolean @DoNotStrip public fun skipActivityIdentityAssertionOnHostPause(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp index 566dcc1a638..7136900e64f 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.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<<6e451f1b402ee9f80e86d0ee6b808f05>> + * @generated SignedSource<> */ /** @@ -345,12 +345,6 @@ class ReactNativeFeatureFlagsJavaProvider return method(javaProvider_); } - bool releaseImageDataWhenConsumed() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("releaseImageDataWhenConsumed"); - return method(javaProvider_); - } - bool shouldPressibilityUseW3CPointerEventsForHover() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("shouldPressibilityUseW3CPointerEventsForHover"); @@ -712,11 +706,6 @@ bool JReactNativeFeatureFlagsCxxInterop::preventShadowTreeCommitExhaustion( return ReactNativeFeatureFlags::preventShadowTreeCommitExhaustion(); } -bool JReactNativeFeatureFlagsCxxInterop::releaseImageDataWhenConsumed( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::releaseImageDataWhenConsumed(); -} - bool JReactNativeFeatureFlagsCxxInterop::shouldPressibilityUseW3CPointerEventsForHover( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::shouldPressibilityUseW3CPointerEventsForHover(); @@ -986,9 +975,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "preventShadowTreeCommitExhaustion", JReactNativeFeatureFlagsCxxInterop::preventShadowTreeCommitExhaustion), - makeNativeMethod( - "releaseImageDataWhenConsumed", - JReactNativeFeatureFlagsCxxInterop::releaseImageDataWhenConsumed), makeNativeMethod( "shouldPressibilityUseW3CPointerEventsForHover", JReactNativeFeatureFlagsCxxInterop::shouldPressibilityUseW3CPointerEventsForHover), 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 534d8e55737..559bf56b3e3 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<<81d70a5d005d308fdc3df3d0e7ec69b9>> + * @generated SignedSource<<31298767c1dd669d2a755e67edacc911>> */ /** @@ -183,9 +183,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool preventShadowTreeCommitExhaustion( facebook::jni::alias_ref); - static bool releaseImageDataWhenConsumed( - facebook::jni::alias_ref); - static bool shouldPressibilityUseW3CPointerEventsForHover( 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 ee2319de5b7..b6eed59ab63 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<> + * @generated SignedSource<<9a538d3ebb58173e7e4e34453b71454b>> */ /** @@ -230,10 +230,6 @@ bool ReactNativeFeatureFlags::preventShadowTreeCommitExhaustion() { return getAccessor().preventShadowTreeCommitExhaustion(); } -bool ReactNativeFeatureFlags::releaseImageDataWhenConsumed() { - return getAccessor().releaseImageDataWhenConsumed(); -} - bool ReactNativeFeatureFlags::shouldPressibilityUseW3CPointerEventsForHover() { return getAccessor().shouldPressibilityUseW3CPointerEventsForHover(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index 8cfe42f56c6..be6ac38c3d6 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<<83c1c5b181d47f4a54cb097f8d31c48a>> + * @generated SignedSource<<3321d357fe5c74fa42c2d0b15a744f87>> */ /** @@ -294,11 +294,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool preventShadowTreeCommitExhaustion(); - /** - * Releases the cached image data when it is consumed by the observers. - */ - RN_EXPORT static bool releaseImageDataWhenConsumed(); - /** * Function used to enable / disable Pressibility from using W3C Pointer Events for its hover callbacks */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index 23e31888072..120375bd4e4 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<<5a84827d553809907a015b01cc5cff66>> + * @generated SignedSource<<041526548ef83b4afb12229a0345e29e>> */ /** @@ -947,24 +947,6 @@ bool ReactNativeFeatureFlagsAccessor::preventShadowTreeCommitExhaustion() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::releaseImageDataWhenConsumed() { - auto flagValue = releaseImageDataWhenConsumed_.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(51, "releaseImageDataWhenConsumed"); - - flagValue = currentProvider_->releaseImageDataWhenConsumed(); - releaseImageDataWhenConsumed_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::shouldPressibilityUseW3CPointerEventsForHover() { auto flagValue = shouldPressibilityUseW3CPointerEventsForHover_.load(); @@ -974,7 +956,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldPressibilityUseW3CPointerEventsForHo // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(52, "shouldPressibilityUseW3CPointerEventsForHover"); + markFlagAsAccessed(51, "shouldPressibilityUseW3CPointerEventsForHover"); flagValue = currentProvider_->shouldPressibilityUseW3CPointerEventsForHover(); shouldPressibilityUseW3CPointerEventsForHover_ = flagValue; @@ -992,7 +974,7 @@ bool ReactNativeFeatureFlagsAccessor::skipActivityIdentityAssertionOnHostPause() // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(53, "skipActivityIdentityAssertionOnHostPause"); + markFlagAsAccessed(52, "skipActivityIdentityAssertionOnHostPause"); flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause(); skipActivityIdentityAssertionOnHostPause_ = flagValue; @@ -1010,7 +992,7 @@ bool ReactNativeFeatureFlagsAccessor::sweepActiveTouchOnChildNativeGesturesAndro // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(54, "sweepActiveTouchOnChildNativeGesturesAndroid"); + markFlagAsAccessed(53, "sweepActiveTouchOnChildNativeGesturesAndroid"); flagValue = currentProvider_->sweepActiveTouchOnChildNativeGesturesAndroid(); sweepActiveTouchOnChildNativeGesturesAndroid_ = flagValue; @@ -1028,7 +1010,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(55, "traceTurboModulePromiseRejectionsOnAndroid"); + markFlagAsAccessed(54, "traceTurboModulePromiseRejectionsOnAndroid"); flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid(); traceTurboModulePromiseRejectionsOnAndroid_ = flagValue; @@ -1046,7 +1028,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit( // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(56, "updateRuntimeShadowNodeReferencesOnCommit"); + markFlagAsAccessed(55, "updateRuntimeShadowNodeReferencesOnCommit"); flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit(); updateRuntimeShadowNodeReferencesOnCommit_ = flagValue; @@ -1064,7 +1046,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(57, "useAlwaysAvailableJSErrorHandling"); + markFlagAsAccessed(56, "useAlwaysAvailableJSErrorHandling"); flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling(); useAlwaysAvailableJSErrorHandling_ = flagValue; @@ -1082,7 +1064,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(58, "useFabricInterop"); + markFlagAsAccessed(57, "useFabricInterop"); flagValue = currentProvider_->useFabricInterop(); useFabricInterop_ = flagValue; @@ -1100,7 +1082,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeEqualsInNativeReadableArrayAndroi // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(59, "useNativeEqualsInNativeReadableArrayAndroid"); + markFlagAsAccessed(58, "useNativeEqualsInNativeReadableArrayAndroid"); flagValue = currentProvider_->useNativeEqualsInNativeReadableArrayAndroid(); useNativeEqualsInNativeReadableArrayAndroid_ = flagValue; @@ -1118,7 +1100,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeTransformHelperAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(60, "useNativeTransformHelperAndroid"); + markFlagAsAccessed(59, "useNativeTransformHelperAndroid"); flagValue = currentProvider_->useNativeTransformHelperAndroid(); useNativeTransformHelperAndroid_ = flagValue; @@ -1136,7 +1118,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(61, "useNativeViewConfigsInBridgelessMode"); + markFlagAsAccessed(60, "useNativeViewConfigsInBridgelessMode"); flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode(); useNativeViewConfigsInBridgelessMode_ = flagValue; @@ -1154,7 +1136,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(62, "useOptimizedEventBatchingOnAndroid"); + markFlagAsAccessed(61, "useOptimizedEventBatchingOnAndroid"); flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid(); useOptimizedEventBatchingOnAndroid_ = flagValue; @@ -1172,7 +1154,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(63, "useRawPropsJsiValue"); + markFlagAsAccessed(62, "useRawPropsJsiValue"); flagValue = currentProvider_->useRawPropsJsiValue(); useRawPropsJsiValue_ = flagValue; @@ -1190,7 +1172,7 @@ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(64, "useShadowNodeStateOnClone"); + markFlagAsAccessed(63, "useShadowNodeStateOnClone"); flagValue = currentProvider_->useShadowNodeStateOnClone(); useShadowNodeStateOnClone_ = flagValue; @@ -1208,7 +1190,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(65, "useTurboModuleInterop"); + markFlagAsAccessed(64, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -1226,7 +1208,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(66, "useTurboModules"); + markFlagAsAccessed(65, "useTurboModules"); flagValue = currentProvider_->useTurboModules(); useTurboModules_ = flagValue; @@ -1244,7 +1226,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewHysteresisRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(67, "virtualViewHysteresisRatio"); + markFlagAsAccessed(66, "virtualViewHysteresisRatio"); flagValue = currentProvider_->virtualViewHysteresisRatio(); virtualViewHysteresisRatio_ = flagValue; @@ -1262,7 +1244,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(68, "virtualViewPrerenderRatio"); + markFlagAsAccessed(67, "virtualViewPrerenderRatio"); flagValue = currentProvider_->virtualViewPrerenderRatio(); virtualViewPrerenderRatio_ = flagValue; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index 09227a0307e..8e8d3c294e4 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<<3e2e6e95c530a18cfd248908e99d6878>> + * @generated SignedSource<<9c51131fae9f19d03050be0c74ca3d4b>> */ /** @@ -83,7 +83,6 @@ class ReactNativeFeatureFlagsAccessor { bool perfMonitorV2Enabled(); double preparedTextCacheSize(); bool preventShadowTreeCommitExhaustion(); - bool releaseImageDataWhenConsumed(); bool shouldPressibilityUseW3CPointerEventsForHover(); bool skipActivityIdentityAssertionOnHostPause(); bool sweepActiveTouchOnChildNativeGesturesAndroid(); @@ -112,7 +111,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 69> accessedFeatureFlags_; + std::array, 68> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> cdpInteractionMetricsEnabled_; @@ -165,7 +164,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> perfMonitorV2Enabled_; std::atomic> preparedTextCacheSize_; std::atomic> preventShadowTreeCommitExhaustion_; - std::atomic> releaseImageDataWhenConsumed_; std::atomic> shouldPressibilityUseW3CPointerEventsForHover_; std::atomic> skipActivityIdentityAssertionOnHostPause_; std::atomic> sweepActiveTouchOnChildNativeGesturesAndroid_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index 7374f24f010..0c29a6ef23c 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<<1285e1c404d7a9554a5285ac3dc63cd1>> + * @generated SignedSource<<5f9c3ecf7887653fd5348a05391ab7d0>> */ /** @@ -231,10 +231,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool releaseImageDataWhenConsumed() override { - return false; - } - bool shouldPressibilityUseW3CPointerEventsForHover() override { return false; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h index ee6e163db8a..1a373688ac0 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.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<<027cef9dd44f14a71be7c0d1b90238b3>> */ /** @@ -504,15 +504,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef return ReactNativeFeatureFlagsDefaults::preventShadowTreeCommitExhaustion(); } - bool releaseImageDataWhenConsumed() override { - auto value = values_["releaseImageDataWhenConsumed"]; - if (!value.isNull()) { - return value.getBool(); - } - - return ReactNativeFeatureFlagsDefaults::releaseImageDataWhenConsumed(); - } - bool shouldPressibilityUseW3CPointerEventsForHover() override { auto value = values_["shouldPressibilityUseW3CPointerEventsForHover"]; if (!value.isNull()) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index 478a9ce0b71..837e85c6fd3 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<<31a4308a13ed1445409f3e5edfd0d388>> + * @generated SignedSource<> */ /** @@ -76,7 +76,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool perfMonitorV2Enabled() = 0; virtual double preparedTextCacheSize() = 0; virtual bool preventShadowTreeCommitExhaustion() = 0; - virtual bool releaseImageDataWhenConsumed() = 0; virtual bool shouldPressibilityUseW3CPointerEventsForHover() = 0; virtual bool skipActivityIdentityAssertionOnHostPause() = 0; virtual bool sweepActiveTouchOnChildNativeGesturesAndroid() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index de00df10bb7..624afc05f7f 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<<40877a198ee2fbcbed13d85abc6f793d>> + * @generated SignedSource<<07df05bf452f78603bbf79594aa0cba0>> */ /** @@ -299,11 +299,6 @@ bool NativeReactNativeFeatureFlags::preventShadowTreeCommitExhaustion( return ReactNativeFeatureFlags::preventShadowTreeCommitExhaustion(); } -bool NativeReactNativeFeatureFlags::releaseImageDataWhenConsumed( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::releaseImageDataWhenConsumed(); -} - bool NativeReactNativeFeatureFlags::shouldPressibilityUseW3CPointerEventsForHover( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::shouldPressibilityUseW3CPointerEventsForHover(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index 02644d780bb..4b1d9860ee4 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<<77f248a7c43e9f11f6e727319a72e1a0>> + * @generated SignedSource<<228d7484ef89bb01fee8dcff2657c56a>> */ /** @@ -138,8 +138,6 @@ class NativeReactNativeFeatureFlags bool preventShadowTreeCommitExhaustion(jsi::Runtime& runtime); - bool releaseImageDataWhenConsumed(jsi::Runtime& runtime); - bool shouldPressibilityUseW3CPointerEventsForHover(jsi::Runtime& runtime); bool skipActivityIdentityAssertionOnHostPause(jsi::Runtime& runtime); diff --git a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.cpp b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.cpp index bbe23fa9565..7328c45f20b 100644 --- a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.cpp +++ b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.cpp @@ -123,11 +123,9 @@ void ImageResponseObserverCoordinator::nativeImageResponseFailed( } void ImageResponseObserverCoordinator::consumeResponse() const { - if (ReactNativeFeatureFlags::releaseImageDataWhenConsumed()) { - status_ = ImageResponse::Status::Consumed; - imageData_.reset(); - imageMetadata_.reset(); - } + status_ = ImageResponse::Status::Consumed; + imageData_.reset(); + imageMetadata_.reset(); } } // namespace facebook::react diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 5b893d3daba..d2116260b4f 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -591,17 +591,6 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'experimental', }, - releaseImageDataWhenConsumed: { - defaultValue: false, - metadata: { - dateAdded: '2025-07-10', - description: - 'Releases the cached image data when it is consumed by the observers.', - expectedReleaseValue: true, - purpose: 'experimentation', - }, - ossReleaseStage: 'none', - }, shouldPressibilityUseW3CPointerEventsForHover: { defaultValue: false, metadata: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 69e673413d1..08f2f5faaeb 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<<22523248acc3e378f3f81ef43406f106>> + * @generated SignedSource<<7de65fc90fa1275f89375fd214b94172>> * @flow strict * @noformat */ @@ -101,7 +101,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{ perfMonitorV2Enabled: Getter, preparedTextCacheSize: Getter, preventShadowTreeCommitExhaustion: Getter, - releaseImageDataWhenConsumed: Getter, shouldPressibilityUseW3CPointerEventsForHover: Getter, skipActivityIdentityAssertionOnHostPause: Getter, sweepActiveTouchOnChildNativeGesturesAndroid: Getter, @@ -404,10 +403,6 @@ export const preparedTextCacheSize: Getter = createNativeFlagGetter('pre * Enables a new mechanism in ShadowTree to prevent problems caused by multiple threads trying to commit concurrently. If a thread tries to commit a few times unsuccessfully, it will acquire a lock and try again. */ export const preventShadowTreeCommitExhaustion: Getter = createNativeFlagGetter('preventShadowTreeCommitExhaustion', false); -/** - * Releases the cached image data when it is consumed by the observers. - */ -export const releaseImageDataWhenConsumed: Getter = createNativeFlagGetter('releaseImageDataWhenConsumed', false); /** * Function used to enable / disable Pressibility from using W3C Pointer Events for its hover callbacks */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index 77024df92d8..ef29da89413 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<<6d699b7dc91fce5814db79d7f19ba511>> + * @generated SignedSource<<1e6f17de0ebb06a085d4cc563df1e32b>> * @flow strict * @noformat */ @@ -76,7 +76,6 @@ export interface Spec extends TurboModule { +perfMonitorV2Enabled?: () => boolean; +preparedTextCacheSize?: () => number; +preventShadowTreeCommitExhaustion?: () => boolean; - +releaseImageDataWhenConsumed?: () => boolean; +shouldPressibilityUseW3CPointerEventsForHover?: () => boolean; +skipActivityIdentityAssertionOnHostPause?: () => boolean; +sweepActiveTouchOnChildNativeGesturesAndroid?: () => boolean;