From 4e12b86bfcac7dfe82822cff270e5f8b08bb1008 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Wed, 16 Oct 2024 09:08:28 -0700 Subject: [PATCH] delete fetchImagesInViewPreallocation feature flag (#47056) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47056 changelog: [internal] Reviewed By: Abbondanzo Differential Revision: D64464758 fbshipit-source-id: 88b8deacac273b693c4bcdd195cbf46441330b0b --- .../featureflags/ReactNativeFeatureFlags.kt | 8 +-- .../ReactNativeFeatureFlagsCxxAccessor.kt | 12 +--- .../ReactNativeFeatureFlagsCxxInterop.kt | 4 +- .../ReactNativeFeatureFlagsDefaults.kt | 4 +- .../ReactNativeFeatureFlagsLocalAccessor.kt | 13 +---- .../ReactNativeFeatureFlagsProvider.kt | 4 +- .../JReactNativeFeatureFlagsCxxInterop.cpp | 16 +---- .../JReactNativeFeatureFlagsCxxInterop.h | 5 +- .../featureflags/ReactNativeFeatureFlags.cpp | 6 +- .../featureflags/ReactNativeFeatureFlags.h | 7 +-- .../ReactNativeFeatureFlagsAccessor.cpp | 58 +++++++------------ .../ReactNativeFeatureFlagsAccessor.h | 6 +- .../ReactNativeFeatureFlagsDefaults.h | 6 +- .../ReactNativeFeatureFlagsProvider.h | 3 +- .../NativeReactNativeFeatureFlags.cpp | 7 +-- .../NativeReactNativeFeatureFlags.h | 4 +- .../ReactNativeFeatureFlags.config.js | 9 --- .../featureflags/ReactNativeFeatureFlags.js | 7 +-- .../specs/NativeReactNativeFeatureFlags.js | 3 +- 19 files changed, 38 insertions(+), 144 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 6da3f111828..3f76b06c119 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<<7d0c7d2dac41c4a64c3c8301b3865fdd>> */ /** @@ -196,12 +196,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun excludeYogaFromRawProps(): Boolean = accessor.excludeYogaFromRawProps() - /** - * Start image fetching during view preallocation instead of waiting for layout pass - */ - @JvmStatic - public fun fetchImagesInViewPreallocation(): Boolean = accessor.fetchImagesInViewPreallocation() - /** * Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React. */ 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 682f303c8dc..62cfcd32f05 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<> + * @generated SignedSource<> */ /** @@ -48,7 +48,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso private var enableUIConsistencyCache: Boolean? = null private var enableViewRecyclingCache: Boolean? = null private var excludeYogaFromRawPropsCache: Boolean? = null - private var fetchImagesInViewPreallocationCache: Boolean? = null private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null private var fixMountingCoordinatorReportedPendingTransactionsOnAndroidCache: Boolean? = null private var forceBatchingMountItemsOnAndroidCache: Boolean? = null @@ -321,15 +320,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso return cached } - override fun fetchImagesInViewPreallocation(): Boolean { - var cached = fetchImagesInViewPreallocationCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.fetchImagesInViewPreallocation() - fetchImagesInViewPreallocationCache = cached - } - return cached - } - override fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean { var cached = fixMappingOfEventPrioritiesBetweenFabricAndReactCache 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 27d4feade5f..a0922e9bc8d 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<<2f1e29ca29c3679e5a87be1d0944efd9>> + * @generated SignedSource<> */ /** @@ -84,8 +84,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun excludeYogaFromRawProps(): Boolean - @DoNotStrip @JvmStatic public external fun fetchImagesInViewPreallocation(): Boolean - @DoNotStrip @JvmStatic public external fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean @DoNotStrip @JvmStatic public external fun fixMountingCoordinatorReportedPendingTransactionsOnAndroid(): 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 c30d36d11f6..153a3d250fe 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<<5613f8d9d9403d005becbbd9348882c6>> */ /** @@ -79,8 +79,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun excludeYogaFromRawProps(): Boolean = false - override fun fetchImagesInViewPreallocation(): Boolean = false - override fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean = false override fun fixMountingCoordinatorReportedPendingTransactionsOnAndroid(): 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 c573dc34cde..883dd08688d 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<> + * @generated SignedSource<<29d21f7f4928086a912088a14cdbd3db>> */ /** @@ -52,7 +52,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces private var enableUIConsistencyCache: Boolean? = null private var enableViewRecyclingCache: Boolean? = null private var excludeYogaFromRawPropsCache: Boolean? = null - private var fetchImagesInViewPreallocationCache: Boolean? = null private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null private var fixMountingCoordinatorReportedPendingTransactionsOnAndroidCache: Boolean? = null private var forceBatchingMountItemsOnAndroidCache: Boolean? = null @@ -353,16 +352,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun fetchImagesInViewPreallocation(): Boolean { - var cached = fetchImagesInViewPreallocationCache - if (cached == null) { - cached = currentProvider.fetchImagesInViewPreallocation() - accessedFeatureFlags.add("fetchImagesInViewPreallocation") - fetchImagesInViewPreallocationCache = cached - } - return cached - } - override fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean { var cached = fixMappingOfEventPrioritiesBetweenFabricAndReactCache 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 2ccc37065ce..e7551a3a607 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<<7abedfd47601a9edd4e2982ea1450590>> + * @generated SignedSource<> */ /** @@ -79,8 +79,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun excludeYogaFromRawProps(): Boolean - @DoNotStrip public fun fetchImagesInViewPreallocation(): Boolean - @DoNotStrip public fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean @DoNotStrip public fun fixMountingCoordinatorReportedPendingTransactionsOnAndroid(): 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 aad5890f839..948f6c159b1 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<<9f5e1568b62ca76e5771fade759d42e5>> + * @generated SignedSource<<3898770919a834c4c4466d0b2797ba8b>> */ /** @@ -207,12 +207,6 @@ class ReactNativeFeatureFlagsProviderHolder return method(javaProvider_); } - bool fetchImagesInViewPreallocation() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("fetchImagesInViewPreallocation"); - return method(javaProvider_); - } - bool fixMappingOfEventPrioritiesBetweenFabricAndReact() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("fixMappingOfEventPrioritiesBetweenFabricAndReact"); @@ -471,11 +465,6 @@ bool JReactNativeFeatureFlagsCxxInterop::excludeYogaFromRawProps( return ReactNativeFeatureFlags::excludeYogaFromRawProps(); } -bool JReactNativeFeatureFlagsCxxInterop::fetchImagesInViewPreallocation( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::fetchImagesInViewPreallocation(); -} - bool JReactNativeFeatureFlagsCxxInterop::fixMappingOfEventPrioritiesBetweenFabricAndReact( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact(); @@ -686,9 +675,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "excludeYogaFromRawProps", JReactNativeFeatureFlagsCxxInterop::excludeYogaFromRawProps), - makeNativeMethod( - "fetchImagesInViewPreallocation", - JReactNativeFeatureFlagsCxxInterop::fetchImagesInViewPreallocation), makeNativeMethod( "fixMappingOfEventPrioritiesBetweenFabricAndReact", JReactNativeFeatureFlagsCxxInterop::fixMappingOfEventPrioritiesBetweenFabricAndReact), 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 9ac211e782d..0ff427ce4d7 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<<879ef38c2b34bc6cd15d6361abef1548>> + * @generated SignedSource<> */ /** @@ -114,9 +114,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool excludeYogaFromRawProps( facebook::jni::alias_ref); - static bool fetchImagesInViewPreallocation( - facebook::jni::alias_ref); - static bool fixMappingOfEventPrioritiesBetweenFabricAndReact( 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 c303c99c0ce..4ab0189b2a8 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<<204e18de128eb47f29ef5383e592e181>> + * @generated SignedSource<<6a62793678276e28e04ebe3d1b8b0d46>> */ /** @@ -138,10 +138,6 @@ bool ReactNativeFeatureFlags::excludeYogaFromRawProps() { return getAccessor().excludeYogaFromRawProps(); } -bool ReactNativeFeatureFlags::fetchImagesInViewPreallocation() { - return getAccessor().fetchImagesInViewPreallocation(); -} - bool ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact() { return getAccessor().fixMappingOfEventPrioritiesBetweenFabricAndReact(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index 877005a73c7..9585a18d4d7 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<<9170ab789417914123e11ecb836aaa9a>> + * @generated SignedSource<<5a537adba978cd74ba62e69d4aeb72b0>> */ /** @@ -179,11 +179,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool excludeYogaFromRawProps(); - /** - * Start image fetching during view preallocation instead of waiting for layout pass - */ - RN_EXPORT static bool fetchImagesInViewPreallocation(); - /** * Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React. */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index d90b96250a2..54d3491c50c 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<> + * @generated SignedSource<> */ /** @@ -533,24 +533,6 @@ bool ReactNativeFeatureFlagsAccessor::excludeYogaFromRawProps() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::fetchImagesInViewPreallocation() { - auto flagValue = fetchImagesInViewPreallocation_.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(28, "fetchImagesInViewPreallocation"); - - flagValue = currentProvider_->fetchImagesInViewPreallocation(); - fetchImagesInViewPreallocation_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::fixMappingOfEventPrioritiesBetweenFabricAndReact() { auto flagValue = fixMappingOfEventPrioritiesBetweenFabricAndReact_.load(); @@ -560,7 +542,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(29, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); + markFlagAsAccessed(28, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact(); fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue; @@ -578,7 +560,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(30, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid"); + markFlagAsAccessed(29, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid"); flagValue = currentProvider_->fixMountingCoordinatorReportedPendingTransactionsOnAndroid(); fixMountingCoordinatorReportedPendingTransactionsOnAndroid_ = flagValue; @@ -596,7 +578,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(31, "forceBatchingMountItemsOnAndroid"); + markFlagAsAccessed(30, "forceBatchingMountItemsOnAndroid"); flagValue = currentProvider_->forceBatchingMountItemsOnAndroid(); forceBatchingMountItemsOnAndroid_ = flagValue; @@ -614,7 +596,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(32, "fuseboxEnabledDebug"); + markFlagAsAccessed(31, "fuseboxEnabledDebug"); flagValue = currentProvider_->fuseboxEnabledDebug(); fuseboxEnabledDebug_ = flagValue; @@ -632,7 +614,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(33, "fuseboxEnabledRelease"); + markFlagAsAccessed(32, "fuseboxEnabledRelease"); flagValue = currentProvider_->fuseboxEnabledRelease(); fuseboxEnabledRelease_ = flagValue; @@ -650,7 +632,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(34, "initEagerTurboModulesOnNativeModulesQueueAndroid"); + markFlagAsAccessed(33, "initEagerTurboModulesOnNativeModulesQueueAndroid"); flagValue = currentProvider_->initEagerTurboModulesOnNativeModulesQueueAndroid(); initEagerTurboModulesOnNativeModulesQueueAndroid_ = flagValue; @@ -668,7 +650,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(35, "lazyAnimationCallbacks"); + markFlagAsAccessed(34, "lazyAnimationCallbacks"); flagValue = currentProvider_->lazyAnimationCallbacks(); lazyAnimationCallbacks_ = flagValue; @@ -686,7 +668,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(36, "loadVectorDrawablesOnImages"); + markFlagAsAccessed(35, "loadVectorDrawablesOnImages"); flagValue = currentProvider_->loadVectorDrawablesOnImages(); loadVectorDrawablesOnImages_ = flagValue; @@ -704,7 +686,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(37, "setAndroidLayoutDirection"); + markFlagAsAccessed(36, "setAndroidLayoutDirection"); flagValue = currentProvider_->setAndroidLayoutDirection(); setAndroidLayoutDirection_ = flagValue; @@ -722,7 +704,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(38, "traceTurboModulePromiseRejectionsOnAndroid"); + markFlagAsAccessed(37, "traceTurboModulePromiseRejectionsOnAndroid"); flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid(); traceTurboModulePromiseRejectionsOnAndroid_ = flagValue; @@ -740,7 +722,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(39, "useFabricInterop"); + markFlagAsAccessed(38, "useFabricInterop"); flagValue = currentProvider_->useFabricInterop(); useFabricInterop_ = flagValue; @@ -758,7 +740,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(40, "useImmediateExecutorInAndroidBridgeless"); + markFlagAsAccessed(39, "useImmediateExecutorInAndroidBridgeless"); flagValue = currentProvider_->useImmediateExecutorInAndroidBridgeless(); useImmediateExecutorInAndroidBridgeless_ = flagValue; @@ -776,7 +758,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(41, "useModernRuntimeScheduler"); + markFlagAsAccessed(40, "useModernRuntimeScheduler"); flagValue = currentProvider_->useModernRuntimeScheduler(); useModernRuntimeScheduler_ = flagValue; @@ -794,7 +776,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(42, "useNativeViewConfigsInBridgelessMode"); + markFlagAsAccessed(41, "useNativeViewConfigsInBridgelessMode"); flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode(); useNativeViewConfigsInBridgelessMode_ = flagValue; @@ -812,7 +794,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(43, "useOptimisedViewPreallocationOnAndroid"); + markFlagAsAccessed(42, "useOptimisedViewPreallocationOnAndroid"); flagValue = currentProvider_->useOptimisedViewPreallocationOnAndroid(); useOptimisedViewPreallocationOnAndroid_ = flagValue; @@ -830,7 +812,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(44, "useOptimizedEventBatchingOnAndroid"); + markFlagAsAccessed(43, "useOptimizedEventBatchingOnAndroid"); flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid(); useOptimizedEventBatchingOnAndroid_ = flagValue; @@ -848,7 +830,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(45, "useRuntimeShadowNodeReferenceUpdate"); + markFlagAsAccessed(44, "useRuntimeShadowNodeReferenceUpdate"); flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdate(); useRuntimeShadowNodeReferenceUpdate_ = flagValue; @@ -866,7 +848,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(46, "useTurboModuleInterop"); + markFlagAsAccessed(45, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -884,7 +866,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(47, "useTurboModules"); + markFlagAsAccessed(46, "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 a91cf698a92..20ba372edb1 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<> + * @generated SignedSource<<3accca8a4ee3ca498f3de148b5c9865f>> */ /** @@ -60,7 +60,6 @@ class ReactNativeFeatureFlagsAccessor { bool enableUIConsistency(); bool enableViewRecycling(); bool excludeYogaFromRawProps(); - bool fetchImagesInViewPreallocation(); bool fixMappingOfEventPrioritiesBetweenFabricAndReact(); bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid(); bool forceBatchingMountItemsOnAndroid(); @@ -91,7 +90,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 48> accessedFeatureFlags_; + std::array, 47> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> allowRecursiveCommitsWithSynchronousMountOnAndroid_; @@ -121,7 +120,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> enableUIConsistency_; std::atomic> enableViewRecycling_; std::atomic> excludeYogaFromRawProps_; - std::atomic> fetchImagesInViewPreallocation_; std::atomic> fixMappingOfEventPrioritiesBetweenFabricAndReact_; std::atomic> fixMountingCoordinatorReportedPendingTransactionsOnAndroid_; std::atomic> forceBatchingMountItemsOnAndroid_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index 5155dce2b43..51b6d132ed9 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<<079a09e6be3d2154e1cb65d58cfe792f>> + * @generated SignedSource<<868e09dabcb458d56f73d5c6ef9ed05b>> */ /** @@ -139,10 +139,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool fetchImagesInViewPreallocation() override { - return false; - } - bool fixMappingOfEventPrioritiesBetweenFabricAndReact() override { return false; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index 1f899448871..61b65a990c1 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<> */ /** @@ -53,7 +53,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool enableUIConsistency() = 0; virtual bool enableViewRecycling() = 0; virtual bool excludeYogaFromRawProps() = 0; - virtual bool fetchImagesInViewPreallocation() = 0; virtual bool fixMappingOfEventPrioritiesBetweenFabricAndReact() = 0; virtual bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid() = 0; virtual bool forceBatchingMountItemsOnAndroid() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index 2e48f9cffab..7f6b3706056 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<<78ccaa6556b191a1e86aee8b74d8939f>> + * @generated SignedSource<<81047b339ef89dfdfa10b58e22d9407d>> */ /** @@ -177,11 +177,6 @@ bool NativeReactNativeFeatureFlags::excludeYogaFromRawProps( return ReactNativeFeatureFlags::excludeYogaFromRawProps(); } -bool NativeReactNativeFeatureFlags::fetchImagesInViewPreallocation( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::fetchImagesInViewPreallocation(); -} - bool NativeReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index 53b51e73677..f0db3eed6aa 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<<7abbf20a370e97c2ef0e59bef4f6164a>> + * @generated SignedSource<<8260155b1822cf4906660d3ad9b298a4>> */ /** @@ -91,8 +91,6 @@ class NativeReactNativeFeatureFlags bool excludeYogaFromRawProps(jsi::Runtime& runtime); - bool fetchImagesInViewPreallocation(jsi::Runtime& runtime); - bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime& runtime); bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid(jsi::Runtime& runtime); diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index c3b8d503dfd..80fa246f9c6 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -274,15 +274,6 @@ const definitions: FeatureFlagDefinitions = { purpose: 'experimentation', }, }, - fetchImagesInViewPreallocation: { - defaultValue: false, - metadata: { - dateAdded: '2024-07-09', - description: - 'Start image fetching during view preallocation instead of waiting for layout pass', - purpose: 'experimentation', - }, - }, fixMappingOfEventPrioritiesBetweenFabricAndReact: { defaultValue: false, metadata: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index bcd9820e354..05ad73e441c 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<<0d6a473cc1c76dc73fe70eb557b6da60>> + * @generated SignedSource<<5f8a62b797980987ce7f415fa00c0965>> * @flow strict */ @@ -78,7 +78,6 @@ export type ReactNativeFeatureFlags = { enableUIConsistency: Getter, enableViewRecycling: Getter, excludeYogaFromRawProps: Getter, - fetchImagesInViewPreallocation: Getter, fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter, fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter, forceBatchingMountItemsOnAndroid: Getter, @@ -297,10 +296,6 @@ export const enableViewRecycling: Getter = createNativeFlagGetter('enab * When enabled, rawProps in Props will not include Yoga specific props. */ export const excludeYogaFromRawProps: Getter = createNativeFlagGetter('excludeYogaFromRawProps', false); -/** - * Start image fetching during view preallocation instead of waiting for layout pass - */ -export const fetchImagesInViewPreallocation: Getter = createNativeFlagGetter('fetchImagesInViewPreallocation', false); /** * Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React. */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index e2bb20b3ef2..4f8dac8cbc2 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<<2dea79097b1952f97d9e5dda86a38e58>> * @flow strict */ @@ -51,7 +51,6 @@ export interface Spec extends TurboModule { +enableUIConsistency?: () => boolean; +enableViewRecycling?: () => boolean; +excludeYogaFromRawProps?: () => boolean; - +fetchImagesInViewPreallocation?: () => boolean; +fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean; +fixMountingCoordinatorReportedPendingTransactionsOnAndroid?: () => boolean; +forceBatchingMountItemsOnAndroid?: () => boolean;