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 64d9a66bae33..29bf8fb06bdd 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<<66a87f8b82a1b3497eb9181a4ac6bab7>> + * @generated SignedSource<<9646ebeba75ec903be5ade7e2333f0c8>> */ /** @@ -468,12 +468,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun useNativeViewConfigsInBridgelessMode(): Boolean = accessor.useNativeViewConfigsInBridgelessMode() - /** - * Uses an optimized mechanism for event batching on Android that does not need to wait for a Choreographer frame callback. - */ - @JvmStatic - public fun useOptimizedEventBatchingOnAndroid(): Boolean = accessor.useOptimizedEventBatchingOnAndroid() - /** * Instead of using folly::dynamic as internal representation in RawProps and RawValue, use jsi::Value */ 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 9acd97571f71..ec42740a8754 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<<5112bb2a180751673d4197088af9fdd1>> + * @generated SignedSource<<9d6ccbe6d02608901fc18ad88baab176>> */ /** @@ -93,7 +93,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces private var useNativeEqualsInNativeReadableArrayAndroidCache: Boolean? = null private var useNativeTransformHelperAndroidCache: Boolean? = null private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null - private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null private var useRawPropsJsiValueCache: Boolean? = null private var useShadowNodeStateOnCloneCache: Boolean? = null private var useSharedAnimatedBackendCache: Boolean? = null @@ -761,15 +760,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun useOptimizedEventBatchingOnAndroid(): Boolean { - var cached = useOptimizedEventBatchingOnAndroidCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.useOptimizedEventBatchingOnAndroid() - useOptimizedEventBatchingOnAndroidCache = cached - } - return cached - } - override fun useRawPropsJsiValue(): Boolean { var cached = useRawPropsJsiValueCache 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 95d3a9173a7e..d49354281fdd 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<> */ /** @@ -174,8 +174,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun useNativeViewConfigsInBridgelessMode(): Boolean - @DoNotStrip @JvmStatic public external fun useOptimizedEventBatchingOnAndroid(): Boolean - @DoNotStrip @JvmStatic public external fun useRawPropsJsiValue(): Boolean @DoNotStrip @JvmStatic public external fun useShadowNodeStateOnClone(): 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 41ef0bd821b4..fdd3b815149e 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<<32ad8dfa8f1c1d662ff0ea7b424eb070>> + * @generated SignedSource<<7b8a5ad9a3353ea32a39bd139e9174f7>> */ /** @@ -169,8 +169,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun useNativeViewConfigsInBridgelessMode(): Boolean = false - override fun useOptimizedEventBatchingOnAndroid(): Boolean = false - override fun useRawPropsJsiValue(): Boolean = true override fun useShadowNodeStateOnClone(): 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 6028c97c5038..ec66c76e0c87 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<<9bb9a7cf89c92f5a397b2328fa983dc6>> */ /** @@ -97,7 +97,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc private var useNativeEqualsInNativeReadableArrayAndroidCache: Boolean? = null private var useNativeTransformHelperAndroidCache: Boolean? = null private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null - private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null private var useRawPropsJsiValueCache: Boolean? = null private var useShadowNodeStateOnCloneCache: Boolean? = null private var useSharedAnimatedBackendCache: Boolean? = null @@ -838,16 +837,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc return cached } - override fun useOptimizedEventBatchingOnAndroid(): Boolean { - var cached = useOptimizedEventBatchingOnAndroidCache - if (cached == null) { - cached = currentProvider.useOptimizedEventBatchingOnAndroid() - accessedFeatureFlags.add("useOptimizedEventBatchingOnAndroid") - useOptimizedEventBatchingOnAndroidCache = cached - } - return cached - } - override fun useRawPropsJsiValue(): Boolean { var cached = useRawPropsJsiValueCache 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 7c23983138b4..cd76bc3df19c 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<> */ /** @@ -169,8 +169,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun useNativeViewConfigsInBridgelessMode(): Boolean - @DoNotStrip public fun useOptimizedEventBatchingOnAndroid(): Boolean - @DoNotStrip public fun useRawPropsJsiValue(): Boolean @DoNotStrip public fun useShadowNodeStateOnClone(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/FabricEventDispatcher.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/FabricEventDispatcher.kt index 8380092e7ccb..7c2e43fc5699 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/FabricEventDispatcher.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/FabricEventDispatcher.kt @@ -7,14 +7,12 @@ package com.facebook.react.uimanager.events -import android.os.Handler import android.view.Choreographer import com.facebook.react.bridge.LifecycleEventListener import com.facebook.react.bridge.ReactApplicationContext import com.facebook.react.bridge.ReactSoftExceptionLogger import com.facebook.react.bridge.UiThreadUtil import com.facebook.react.common.annotations.UnstableReactNativeAPI -import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags import com.facebook.react.modules.core.ReactChoreographer import com.facebook.react.uimanager.UIManagerHelper import com.facebook.react.uimanager.common.UIManagerType @@ -41,19 +39,6 @@ internal class FabricEventDispatcher( private val postEventDispatchListeners = CopyOnWriteArrayList() private val currentFrameCallback = ScheduleDispatchFrameCallback() - private var isDispatchScheduled = false - private val dispatchEventsRunnable = Runnable { - isDispatchScheduled = false - Systrace.beginSection(Systrace.TRACE_TAG_REACT, "BatchEventDispatchedListeners") - try { - for (listener in postEventDispatchListeners) { - listener.onBatchEventDispatched() - } - } finally { - Systrace.endSection(Systrace.TRACE_TAG_REACT) - } - } - init { reactContext.addLifecycleEventListener(this) eventEmitter.registerFabricEventEmitter(fabricEventEmitter) @@ -109,14 +94,7 @@ internal class FabricEventDispatcher( } private fun scheduleDispatchOfBatchedEvents() { - if (ReactNativeFeatureFlags.useOptimizedEventBatchingOnAndroid()) { - if (!isDispatchScheduled) { - isDispatchScheduled = true - uiThreadHandler.postAtFrontOfQueue(dispatchEventsRunnable) - } - } else { - currentFrameCallback.maybeScheduleDispatchOfBatchedEvents() - } + currentFrameCallback.maybeScheduleDispatchOfBatchedEvents() } /** Add a listener to this EventDispatcher. */ @@ -139,9 +117,7 @@ internal class FabricEventDispatcher( override fun onHostResume() { scheduleDispatchOfBatchedEvents() - if (!ReactNativeFeatureFlags.useOptimizedEventBatchingOnAndroid()) { - currentFrameCallback.resume() - } + currentFrameCallback.resume() } override fun onHostPause() { @@ -165,12 +141,7 @@ internal class FabricEventDispatcher( private fun cancelDispatchOfBatchedEvents() { UiThreadUtil.assertOnUiThread() - if (ReactNativeFeatureFlags.useOptimizedEventBatchingOnAndroid()) { - isDispatchScheduled = false - uiThreadHandler.removeCallbacks(dispatchEventsRunnable) - } else { - currentFrameCallback.stop() - } + currentFrameCallback.stop() } private inner class ScheduleDispatchFrameCallback : Choreographer.FrameCallback { @@ -229,8 +200,4 @@ internal class FabricEventDispatcher( } } } - - private companion object { - private val uiThreadHandler: Handler = UiThreadUtil.getUiThreadHandler() - } } 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 220807e3fd24..df06cc588264 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<<0527dbb4a838be34b80d76b11d18cea0>> */ /** @@ -477,12 +477,6 @@ class ReactNativeFeatureFlagsJavaProvider return method(javaProvider_); } - bool useOptimizedEventBatchingOnAndroid() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("useOptimizedEventBatchingOnAndroid"); - return method(javaProvider_); - } - bool useRawPropsJsiValue() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("useRawPropsJsiValue"); @@ -906,11 +900,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode( return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode(); } -bool JReactNativeFeatureFlagsCxxInterop::useOptimizedEventBatchingOnAndroid( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::useOptimizedEventBatchingOnAndroid(); -} - bool JReactNativeFeatureFlagsCxxInterop::useRawPropsJsiValue( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::useRawPropsJsiValue(); @@ -1206,9 +1195,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "useNativeViewConfigsInBridgelessMode", JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode), - makeNativeMethod( - "useOptimizedEventBatchingOnAndroid", - JReactNativeFeatureFlagsCxxInterop::useOptimizedEventBatchingOnAndroid), makeNativeMethod( "useRawPropsJsiValue", JReactNativeFeatureFlagsCxxInterop::useRawPropsJsiValue), 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 b6cb81ed6250..64a4b5ec585d 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<<1e735f99b2d275f5065fb7959e45adc5>> + * @generated SignedSource<> */ /** @@ -249,9 +249,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool useNativeViewConfigsInBridgelessMode( facebook::jni::alias_ref); - static bool useOptimizedEventBatchingOnAndroid( - facebook::jni::alias_ref); - static bool useRawPropsJsiValue( 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 b6b5724c2729..c3adaa661754 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<<5a7c80b50fda63afb95e8c6f4651eebc>> + * @generated SignedSource<> */ /** @@ -318,10 +318,6 @@ bool ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode() { return getAccessor().useNativeViewConfigsInBridgelessMode(); } -bool ReactNativeFeatureFlags::useOptimizedEventBatchingOnAndroid() { - return getAccessor().useOptimizedEventBatchingOnAndroid(); -} - bool ReactNativeFeatureFlags::useRawPropsJsiValue() { return getAccessor().useRawPropsJsiValue(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index f8bb4c8b49cc..5a46288842e9 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<<8122e5c1e177a8f3deb2462a86f7cf64>> + * @generated SignedSource<<467f48f2231ceb6772a9a9da9e3badb9>> */ /** @@ -404,11 +404,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool useNativeViewConfigsInBridgelessMode(); - /** - * Uses an optimized mechanism for event batching on Android that does not need to wait for a Choreographer frame callback. - */ - RN_EXPORT static bool useOptimizedEventBatchingOnAndroid(); - /** * Instead of using folly::dynamic as internal representation in RawProps and RawValue, use jsi::Value */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index e79f9912c3f1..7093ce280a74 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<<8f6640b5dc86a3f50b14ba9d222de89c>> */ /** @@ -1343,24 +1343,6 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() { - auto flagValue = useOptimizedEventBatchingOnAndroid_.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(73, "useOptimizedEventBatchingOnAndroid"); - - flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid(); - useOptimizedEventBatchingOnAndroid_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() { auto flagValue = useRawPropsJsiValue_.load(); @@ -1370,7 +1352,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(74, "useRawPropsJsiValue"); + markFlagAsAccessed(73, "useRawPropsJsiValue"); flagValue = currentProvider_->useRawPropsJsiValue(); useRawPropsJsiValue_ = flagValue; @@ -1388,7 +1370,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(75, "useShadowNodeStateOnClone"); + markFlagAsAccessed(74, "useShadowNodeStateOnClone"); flagValue = currentProvider_->useShadowNodeStateOnClone(); useShadowNodeStateOnClone_ = flagValue; @@ -1406,7 +1388,7 @@ bool ReactNativeFeatureFlagsAccessor::useSharedAnimatedBackend() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(76, "useSharedAnimatedBackend"); + markFlagAsAccessed(75, "useSharedAnimatedBackend"); flagValue = currentProvider_->useSharedAnimatedBackend(); useSharedAnimatedBackend_ = flagValue; @@ -1424,7 +1406,7 @@ bool ReactNativeFeatureFlagsAccessor::useTraitHiddenOnAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(77, "useTraitHiddenOnAndroid"); + markFlagAsAccessed(76, "useTraitHiddenOnAndroid"); flagValue = currentProvider_->useTraitHiddenOnAndroid(); useTraitHiddenOnAndroid_ = flagValue; @@ -1442,7 +1424,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(78, "useTurboModuleInterop"); + markFlagAsAccessed(77, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -1460,7 +1442,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(79, "useTurboModules"); + markFlagAsAccessed(78, "useTurboModules"); flagValue = currentProvider_->useTurboModules(); useTurboModules_ = flagValue; @@ -1478,7 +1460,7 @@ double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(80, "viewCullingOutsetRatio"); + markFlagAsAccessed(79, "viewCullingOutsetRatio"); flagValue = currentProvider_->viewCullingOutsetRatio(); viewCullingOutsetRatio_ = flagValue; @@ -1496,7 +1478,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(81, "virtualViewHysteresisRatio"); + markFlagAsAccessed(80, "virtualViewHysteresisRatio"); flagValue = currentProvider_->virtualViewHysteresisRatio(); virtualViewHysteresisRatio_ = flagValue; @@ -1514,7 +1496,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(82, "virtualViewPrerenderRatio"); + markFlagAsAccessed(81, "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 cc1e6e79a02e..b626cc49c70c 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<> */ /** @@ -105,7 +105,6 @@ class ReactNativeFeatureFlagsAccessor { bool useNativeEqualsInNativeReadableArrayAndroid(); bool useNativeTransformHelperAndroid(); bool useNativeViewConfigsInBridgelessMode(); - bool useOptimizedEventBatchingOnAndroid(); bool useRawPropsJsiValue(); bool useShadowNodeStateOnClone(); bool useSharedAnimatedBackend(); @@ -126,7 +125,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 83> accessedFeatureFlags_; + std::array, 82> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> cdpInteractionMetricsEnabled_; @@ -201,7 +200,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> useNativeEqualsInNativeReadableArrayAndroid_; std::atomic> useNativeTransformHelperAndroid_; std::atomic> useNativeViewConfigsInBridgelessMode_; - std::atomic> useOptimizedEventBatchingOnAndroid_; std::atomic> useRawPropsJsiValue_; std::atomic> useShadowNodeStateOnClone_; std::atomic> useSharedAnimatedBackend_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index d2de2e204ac0..32aecdc212e3 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<<4e4623461411b957286ef050ec0c4f6f>> + * @generated SignedSource<<85c260dcb8eb9209a53207c3c54183f0>> */ /** @@ -319,10 +319,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool useOptimizedEventBatchingOnAndroid() override { - return false; - } - bool useRawPropsJsiValue() override { return true; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h index 5731aa38e58b..34ce8c68d0c7 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<<0224a638fbec556a62c58f5d84c4c662>> */ /** @@ -702,15 +702,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef return ReactNativeFeatureFlagsDefaults::useNativeViewConfigsInBridgelessMode(); } - bool useOptimizedEventBatchingOnAndroid() override { - auto value = values_["useOptimizedEventBatchingOnAndroid"]; - if (!value.isNull()) { - return value.getBool(); - } - - return ReactNativeFeatureFlagsDefaults::useOptimizedEventBatchingOnAndroid(); - } - bool useRawPropsJsiValue() override { auto value = values_["useRawPropsJsiValue"]; if (!value.isNull()) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index 0b0d28f10150..f2dcc71af4ec 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<<5dbb5d1dd34c8bdd887de68a074449b6>> + * @generated SignedSource<> */ /** @@ -98,7 +98,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool useNativeEqualsInNativeReadableArrayAndroid() = 0; virtual bool useNativeTransformHelperAndroid() = 0; virtual bool useNativeViewConfigsInBridgelessMode() = 0; - virtual bool useOptimizedEventBatchingOnAndroid() = 0; virtual bool useRawPropsJsiValue() = 0; virtual bool useShadowNodeStateOnClone() = 0; virtual bool useSharedAnimatedBackend() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index e566c70eb868..05c867b7f714 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<<5963824c70d97cf048050db905350692>> + * @generated SignedSource<> */ /** @@ -409,11 +409,6 @@ bool NativeReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode( return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode(); } -bool NativeReactNativeFeatureFlags::useOptimizedEventBatchingOnAndroid( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::useOptimizedEventBatchingOnAndroid(); -} - bool NativeReactNativeFeatureFlags::useRawPropsJsiValue( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::useRawPropsJsiValue(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index d4da9a5798fa..cd406e004de4 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<<84b5ef5e3ada0d6f2b10abfffa6d9d0f>> + * @generated SignedSource<<0d898a94decb43e191a343676c8afb91>> */ /** @@ -182,8 +182,6 @@ class NativeReactNativeFeatureFlags bool useNativeViewConfigsInBridgelessMode(jsi::Runtime& runtime); - bool useOptimizedEventBatchingOnAndroid(jsi::Runtime& runtime); - bool useRawPropsJsiValue(jsi::Runtime& runtime); bool useShadowNodeStateOnClone(jsi::Runtime& runtime); diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 4db09968a1f1..6388b73719a7 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -825,17 +825,6 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'canary', }, - useOptimizedEventBatchingOnAndroid: { - defaultValue: false, - metadata: { - dateAdded: '2024-08-29', - description: - 'Uses an optimized mechanism for event batching on Android that does not need to wait for a Choreographer frame callback.', - expectedReleaseValue: true, - purpose: 'experimentation', - }, - ossReleaseStage: 'none', - }, useRawPropsJsiValue: { defaultValue: true, metadata: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 04a9285046bd..aa7c52f4a1b2 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<<954a37442d8c691f35c868b9998a5aa3>> + * @generated SignedSource<> * @flow strict * @noformat */ @@ -123,7 +123,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{ useNativeEqualsInNativeReadableArrayAndroid: Getter, useNativeTransformHelperAndroid: Getter, useNativeViewConfigsInBridgelessMode: Getter, - useOptimizedEventBatchingOnAndroid: Getter, useRawPropsJsiValue: Getter, useShadowNodeStateOnClone: Getter, useSharedAnimatedBackend: Getter, @@ -506,10 +505,6 @@ export const useNativeTransformHelperAndroid: Getter = createNativeFlag * When enabled, the native view configs are used in bridgeless mode. */ export const useNativeViewConfigsInBridgelessMode: Getter = createNativeFlagGetter('useNativeViewConfigsInBridgelessMode', false); -/** - * Uses an optimized mechanism for event batching on Android that does not need to wait for a Choreographer frame callback. - */ -export const useOptimizedEventBatchingOnAndroid: Getter = createNativeFlagGetter('useOptimizedEventBatchingOnAndroid', false); /** * Instead of using folly::dynamic as internal representation in RawProps and RawValue, use jsi::Value */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index c60064de83dd..218586e3e244 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<<05001c6fab50172dc659d30b5e82af20>> + * @generated SignedSource<<53fc9aca82f76eb0519b03187993359a>> * @flow strict * @noformat */ @@ -98,7 +98,6 @@ export interface Spec extends TurboModule { +useNativeEqualsInNativeReadableArrayAndroid?: () => boolean; +useNativeTransformHelperAndroid?: () => boolean; +useNativeViewConfigsInBridgelessMode?: () => boolean; - +useOptimizedEventBatchingOnAndroid?: () => boolean; +useRawPropsJsiValue?: () => boolean; +useShadowNodeStateOnClone?: () => boolean; +useSharedAnimatedBackend?: () => boolean;