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 242557e325f..c5f9dc4e0be 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<> */ /** @@ -70,12 +70,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun enableMicrotasks(): Boolean = accessor.enableMicrotasks() - /** - * When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop. - */ - @JvmStatic - public fun batchRenderingUpdatesInEventLoop(): Boolean = accessor.batchRenderingUpdatesInEventLoop() - /** * Uses new, deduplicated logic for constructing Android Spannables from text fragments */ 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 c89440cc6a7..512b43d8d92 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<<40668dcd951123da7c0b4ddde23f94c9>> + * @generated SignedSource<> */ /** @@ -27,7 +27,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso private var enableBackgroundExecutorCache: Boolean? = null private var useModernRuntimeSchedulerCache: Boolean? = null private var enableMicrotasksCache: Boolean? = null - private var batchRenderingUpdatesInEventLoopCache: Boolean? = null private var enableSpannableBuildingUnificationCache: Boolean? = null private var enableCustomDrawOrderFabricCache: Boolean? = null private var enableFixForClippedSubviewsCrashCache: Boolean? = null @@ -97,15 +96,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso return cached } - override fun batchRenderingUpdatesInEventLoop(): Boolean { - var cached = batchRenderingUpdatesInEventLoopCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.batchRenderingUpdatesInEventLoop() - batchRenderingUpdatesInEventLoopCache = cached - } - return cached - } - override fun enableSpannableBuildingUnification(): Boolean { var cached = enableSpannableBuildingUnificationCache 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 07dd950fe85..7ce102e9526 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<<5fece1bcbbd750b82b8e4b125c57101e>> */ /** @@ -42,8 +42,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun enableMicrotasks(): Boolean - @DoNotStrip @JvmStatic public external fun batchRenderingUpdatesInEventLoop(): Boolean - @DoNotStrip @JvmStatic public external fun enableSpannableBuildingUnification(): Boolean @DoNotStrip @JvmStatic public external fun enableCustomDrawOrderFabric(): 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 20a6fb3300c..96bccc3a818 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<<4462edcf10a85654be7c71a7438a2288>> */ /** @@ -37,8 +37,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun enableMicrotasks(): Boolean = false - override fun batchRenderingUpdatesInEventLoop(): Boolean = false - override fun enableSpannableBuildingUnification(): Boolean = false override fun enableCustomDrawOrderFabric(): 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 36393cf0f1f..acb8e387693 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<> */ /** @@ -31,7 +31,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces private var enableBackgroundExecutorCache: Boolean? = null private var useModernRuntimeSchedulerCache: Boolean? = null private var enableMicrotasksCache: Boolean? = null - private var batchRenderingUpdatesInEventLoopCache: Boolean? = null private var enableSpannableBuildingUnificationCache: Boolean? = null private var enableCustomDrawOrderFabricCache: Boolean? = null private var enableFixForClippedSubviewsCrashCache: Boolean? = null @@ -108,16 +107,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun batchRenderingUpdatesInEventLoop(): Boolean { - var cached = batchRenderingUpdatesInEventLoopCache - if (cached == null) { - cached = currentProvider.batchRenderingUpdatesInEventLoop() - accessedFeatureFlags.add("batchRenderingUpdatesInEventLoop") - batchRenderingUpdatesInEventLoopCache = cached - } - return cached - } - override fun enableSpannableBuildingUnification(): Boolean { var cached = enableSpannableBuildingUnificationCache 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 3211bb55c2f..8db8c67bfd2 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<> + * @generated SignedSource<<9190129a45a19b25dd23126f05b03356>> */ /** @@ -37,8 +37,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun enableMicrotasks(): Boolean - @DoNotStrip public fun batchRenderingUpdatesInEventLoop(): Boolean - @DoNotStrip public fun enableSpannableBuildingUnification(): Boolean @DoNotStrip public fun enableCustomDrawOrderFabric(): 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 5a5ffe1ce97..d800c08086f 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<> + * @generated SignedSource<<7ab741aec808bc3a138470fe18ef8b8a>> */ /** @@ -81,12 +81,6 @@ class ReactNativeFeatureFlagsProviderHolder return method(javaProvider_); } - bool batchRenderingUpdatesInEventLoop() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("batchRenderingUpdatesInEventLoop"); - return method(javaProvider_); - } - bool enableSpannableBuildingUnification() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("enableSpannableBuildingUnification"); @@ -156,11 +150,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableMicrotasks( return ReactNativeFeatureFlags::enableMicrotasks(); } -bool JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop(); -} - bool JReactNativeFeatureFlagsCxxInterop::enableSpannableBuildingUnification( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::enableSpannableBuildingUnification(); @@ -224,9 +213,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "enableMicrotasks", JReactNativeFeatureFlagsCxxInterop::enableMicrotasks), - makeNativeMethod( - "batchRenderingUpdatesInEventLoop", - JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop), makeNativeMethod( "enableSpannableBuildingUnification", JReactNativeFeatureFlagsCxxInterop::enableSpannableBuildingUnification), 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 1f430fc7104..ce97635d8fa 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<<3a6ff4e2f6d4056d903542cc620e07a9>> + * @generated SignedSource<<0d37cc1fb8217b0f4a849e178ec2ec68>> */ /** @@ -51,9 +51,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool enableMicrotasks( facebook::jni::alias_ref); - static bool batchRenderingUpdatesInEventLoop( - facebook::jni::alias_ref); - static bool enableSpannableBuildingUnification( 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 e64540e127f..3e4989ac348 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<<6305ea7c2cb59caeaf2ea9cea69b8203>> + * @generated SignedSource<<7ba277e9902ca2a0b171daf223644b89>> */ /** @@ -49,10 +49,6 @@ bool ReactNativeFeatureFlags::enableMicrotasks() { return getAccessor().enableMicrotasks(); } -bool ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop() { - return getAccessor().batchRenderingUpdatesInEventLoop(); -} - bool ReactNativeFeatureFlags::enableSpannableBuildingUnification() { return getAccessor().enableSpannableBuildingUnification(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index 248cac686bf..2dbc253f97f 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<<5a5c6772253f49b0b768cd7ef090af14>> + * @generated SignedSource<> */ /** @@ -36,22 +36,22 @@ class ReactNativeFeatureFlags { /** * Common flag for testing. Do NOT modify. */ - RN_EXPORT static bool commonTestFlag(); + static bool commonTestFlag(); /** * To be used with batchRenderingUpdatesInEventLoop. When enbled, the Android mounting layer will concatenate pending transactions to ensure they're applied atomatically */ - RN_EXPORT static bool androidEnablePendingFabricTransactions(); + static bool androidEnablePendingFabricTransactions(); /** * When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop. */ - RN_EXPORT static bool batchRenderingUpdatesInEventLoop(); + static bool batchRenderingUpdatesInEventLoop(); /** * When enabled, ReactInstanceManager will clean up Fabric surfaces on destroy(). */ - RN_EXPORT static bool destroyFabricSurfacesInReactInstanceManager(); + static bool destroyFabricSurfacesInReactInstanceManager(); /** * Enables the use of a background executor to compute layout and commit updates on Fabric (this system is deprecated and should not be used). @@ -68,11 +68,6 @@ class ReactNativeFeatureFlags { */ static bool enableMicrotasks(); - /** - * When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop. - */ - static bool batchRenderingUpdatesInEventLoop(); - /** * Uses new, deduplicated logic for constructing Android Spannables from text fragments */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index 3a9977ead0a..0bbed9699bd 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<<5311a007bec258c79bf1ca3e2355101c>> */ /** @@ -119,8 +119,8 @@ bool ReactNativeFeatureFlagsAccessor::enableBackgroundExecutor() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::enableCleanTextInputYogaNode() { - auto flagValue = enableCleanTextInputYogaNode_.load(); +bool ReactNativeFeatureFlagsAccessor::useModernRuntimeScheduler() { + auto flagValue = useModernRuntimeScheduler_.load(); if (!flagValue.has_value()) { // This block is not exclusive but it is not necessary. @@ -128,25 +128,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(5, "enableCleanTextInputYogaNode"); - - flagValue = currentProvider_->enableCleanTextInputYogaNode(); - enableCleanTextInputYogaNode_ = flagValue; - } - - return flagValue.value(); -} - -bool ReactNativeFeatureFlagsAccessor::enableCustomDrawOrderFabric() { - auto flagValue = enableCustomDrawOrderFabric_.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(6, "enableCustomDrawOrderFabric"); + markFlagAsAccessed(5, "useModernRuntimeScheduler"); flagValue = currentProvider_->useModernRuntimeScheduler(); useModernRuntimeScheduler_ = flagValue; @@ -164,7 +146,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(7, "enableMicrotasks"); + markFlagAsAccessed(6, "enableMicrotasks"); flagValue = currentProvider_->enableMicrotasks(); enableMicrotasks_ = flagValue; @@ -173,24 +155,6 @@ bool ReactNativeFeatureFlagsAccessor::enableMicrotasks() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::batchRenderingUpdatesInEventLoop() { - auto flagValue = batchRenderingUpdatesInEventLoop_.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(8, "enableSpannableBuildingUnification"); - - flagValue = currentProvider_->batchRenderingUpdatesInEventLoop(); - batchRenderingUpdatesInEventLoop_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::enableSpannableBuildingUnification() { auto flagValue = enableSpannableBuildingUnification_.load(); @@ -200,7 +164,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSpannableBuildingUnification() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(9, "enableSynchronousStateUpdates"); + markFlagAsAccessed(7, "enableSpannableBuildingUnification"); flagValue = currentProvider_->enableSpannableBuildingUnification(); enableSpannableBuildingUnification_ = flagValue; @@ -218,7 +182,7 @@ bool ReactNativeFeatureFlagsAccessor::enableCustomDrawOrderFabric() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(10, "enableUIConsistency"); + markFlagAsAccessed(8, "enableCustomDrawOrderFabric"); flagValue = currentProvider_->enableCustomDrawOrderFabric(); enableCustomDrawOrderFabric_ = flagValue; @@ -236,7 +200,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFixForClippedSubviewsCrash() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(11, "forceBatchingMountItemsOnAndroid"); + markFlagAsAccessed(9, "enableFixForClippedSubviewsCrash"); flagValue = currentProvider_->enableFixForClippedSubviewsCrash(); enableFixForClippedSubviewsCrash_ = flagValue; @@ -254,7 +218,7 @@ bool ReactNativeFeatureFlagsAccessor::inspectorEnableCxxInspectorPackagerConnect // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(12, "inspectorEnableCxxInspectorPackagerConnection"); + markFlagAsAccessed(10, "inspectorEnableCxxInspectorPackagerConnection"); flagValue = currentProvider_->inspectorEnableCxxInspectorPackagerConnection(); inspectorEnableCxxInspectorPackagerConnection_ = flagValue; @@ -272,7 +236,7 @@ bool ReactNativeFeatureFlagsAccessor::inspectorEnableModernCDPRegistry() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(13, "inspectorEnableModernCDPRegistry"); + markFlagAsAccessed(11, "inspectorEnableModernCDPRegistry"); flagValue = currentProvider_->inspectorEnableModernCDPRegistry(); inspectorEnableModernCDPRegistry_ = flagValue; @@ -281,78 +245,6 @@ bool ReactNativeFeatureFlagsAccessor::inspectorEnableModernCDPRegistry() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::preventDoubleTextMeasure() { - auto flagValue = preventDoubleTextMeasure_.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(14, "preventDoubleTextMeasure"); - - flagValue = currentProvider_->preventDoubleTextMeasure(); - preventDoubleTextMeasure_ = flagValue; - } - - return flagValue.value(); -} - -bool ReactNativeFeatureFlagsAccessor::useModernRuntimeScheduler() { - auto flagValue = useModernRuntimeScheduler_.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(15, "useModernRuntimeScheduler"); - - flagValue = currentProvider_->useModernRuntimeScheduler(); - useModernRuntimeScheduler_ = flagValue; - } - - return flagValue.value(); -} - -bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() { - auto flagValue = useNativeViewConfigsInBridgelessMode_.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(16, "useNativeViewConfigsInBridgelessMode"); - - flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode(); - useNativeViewConfigsInBridgelessMode_ = flagValue; - } - - return flagValue.value(); -} - -bool ReactNativeFeatureFlagsAccessor::useStateAlignmentMechanism() { - auto flagValue = useStateAlignmentMechanism_.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(17, "useStateAlignmentMechanism"); - - flagValue = currentProvider_->useStateAlignmentMechanism(); - useStateAlignmentMechanism_ = flagValue; - } - - return flagValue.value(); -} - void ReactNativeFeatureFlagsAccessor::override( std::unique_ptr provider) { if (wasOverridden_) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index f27cd809a5b..e6a98054acd 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<<9be1a64b5efca2421dfb093dbcc1f793>> + * @generated SignedSource<> */ /** @@ -38,7 +38,6 @@ class ReactNativeFeatureFlagsAccessor { bool enableBackgroundExecutor(); bool useModernRuntimeScheduler(); bool enableMicrotasks(); - bool batchRenderingUpdatesInEventLoop(); bool enableSpannableBuildingUnification(); bool enableCustomDrawOrderFabric(); bool enableFixForClippedSubviewsCrash(); @@ -54,7 +53,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 18> accessedFeatureFlags_; + std::array, 12> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> androidEnablePendingFabricTransactions_; @@ -63,7 +62,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> enableBackgroundExecutor_; std::atomic> useModernRuntimeScheduler_; std::atomic> enableMicrotasks_; - std::atomic> batchRenderingUpdatesInEventLoop_; std::atomic> enableSpannableBuildingUnification_; std::atomic> enableCustomDrawOrderFabric_; std::atomic> enableFixForClippedSubviewsCrash_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index 3b5eb1a4bab..e9d8d4a0f8f 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<> + * @generated SignedSource<<8a0f2e61752ae83a7a3032939f4a59fa>> */ /** @@ -55,10 +55,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool batchRenderingUpdatesInEventLoop() override { - return false; - } - bool enableSpannableBuildingUnification() override { return false; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index 35bb7d42c9c..bdf24ccb773 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<<3f99a52c114d6f96edb2b2b2f549b6a6>> + * @generated SignedSource<<9194d576893a97a6d9b88f5a32c71197>> */ /** @@ -32,7 +32,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool enableBackgroundExecutor() = 0; virtual bool useModernRuntimeScheduler() = 0; virtual bool enableMicrotasks() = 0; - virtual bool batchRenderingUpdatesInEventLoop() = 0; virtual bool enableSpannableBuildingUnification() = 0; virtual bool enableCustomDrawOrderFabric() = 0; virtual bool enableFixForClippedSubviewsCrash() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index 344ec4a97c5..027970860da 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<<5285ee6c09bf4614cb5098952aac8c87>> + * @generated SignedSource<<6d0bae7c1b0d126e58c8b9bdeaf9247e>> */ /** @@ -70,11 +70,6 @@ bool NativeReactNativeFeatureFlags::enableMicrotasks( return ReactNativeFeatureFlags::enableMicrotasks(); } -bool NativeReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop(); -} - bool NativeReactNativeFeatureFlags::enableSpannableBuildingUnification( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::enableSpannableBuildingUnification(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index bbfcd70a665..0b63229c4fd 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<<86afdf79a8a49da18eddf53bc9d41051>> + * @generated SignedSource<> */ /** @@ -44,8 +44,6 @@ class NativeReactNativeFeatureFlags bool enableMicrotasks(jsi::Runtime& runtime); - bool batchRenderingUpdatesInEventLoop(jsi::Runtime& runtime); - bool enableSpannableBuildingUnification(jsi::Runtime& runtime); bool enableCustomDrawOrderFabric(jsi::Runtime& runtime); diff --git a/packages/react-native/src/private/featureflags/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/NativeReactNativeFeatureFlags.js index 04000941c9d..0aa146d124e 100644 --- a/packages/react-native/src/private/featureflags/NativeReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/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<<8f82962343a5146622f36c2de071ff6a>> * @flow strict-local */ @@ -30,7 +30,6 @@ export interface Spec extends TurboModule { +enableBackgroundExecutor?: () => boolean; +useModernRuntimeScheduler?: () => boolean; +enableMicrotasks?: () => boolean; - +batchRenderingUpdatesInEventLoop?: () => boolean; +enableSpannableBuildingUnification?: () => boolean; +enableCustomDrawOrderFabric?: () => boolean; +enableFixForClippedSubviewsCrash?: () => boolean; diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index c224753733c..117ea39d7f0 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<<6b90f52915db22d4077011a55a519b20>> + * @generated SignedSource<> * @flow strict-local */ @@ -47,7 +47,6 @@ export type ReactNativeFeatureFlags = { enableBackgroundExecutor: Getter, useModernRuntimeScheduler: Getter, enableMicrotasks: Getter, - batchRenderingUpdatesInEventLoop: Getter, enableSpannableBuildingUnification: Getter, enableCustomDrawOrderFabric: Getter, enableFixForClippedSubviewsCrash: Getter, @@ -123,10 +122,6 @@ export const useModernRuntimeScheduler: Getter = createNativeFlagGetter * Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution). */ export const enableMicrotasks: Getter = createNativeFlagGetter('enableMicrotasks', false); -/** - * When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop. - */ -export const batchRenderingUpdatesInEventLoop: Getter = createNativeFlagGetter('batchRenderingUpdatesInEventLoop', false); /** * Uses new, deduplicated logic for constructing Android Spannables from text fragments */