Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions packages/react-native/React/Fabric/RCTSurfacePresenter.mm
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,6 @@
using namespace facebook;
using namespace facebook::react;

static dispatch_queue_t RCTGetBackgroundQueue()
{
static dispatch_queue_t queue;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
dispatch_queue_attr_t attr =
dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_SERIAL, QOS_CLASS_USER_INTERACTIVE, 0);
queue = dispatch_queue_create("com.facebook.react.background", attr);
});
return queue;
}

static BackgroundExecutor RCTGetBackgroundExecutor()
{
return [](std::function<void()> &&callback) {
if (RCTIsMainQueue()) {
callback();
return;
}

auto copyableCallback = callback;
dispatch_async(RCTGetBackgroundQueue(), ^{
copyableCallback();
});
};
}

@interface RCTSurfacePresenter () <RCTSchedulerDelegate, RCTMountingManagerDelegate>
@end

Expand Down Expand Up @@ -288,10 +261,6 @@ - (RCTScheduler *)_createScheduler
toolbox.runtimeExecutor = runtimeExecutor;
toolbox.bridgelessBindingsExecutor = _bridgelessBindingsExecutor;

if (ReactNativeFeatureFlags::enableBackgroundExecutor()) {
toolbox.backgroundExecutor = RCTGetBackgroundExecutor();
}

toolbox.asynchronousEventBeatFactory =
[runtimeExecutor](const EventBeat::SharedOwnerBox &ownerBox) -> std::unique_ptr<EventBeat> {
auto runLoopObserver =
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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<<9e8a8beb3d769dbf5067ea8f7f7e083a>>
* @generated SignedSource<<e7aaf58d91c8e25685f2a3ec5ca171a9>>
*/

/**
Expand Down Expand Up @@ -58,12 +58,6 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun destroyFabricSurfacesInReactInstanceManager(): Boolean = accessor.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).
*/
@JvmStatic
public fun enableBackgroundExecutor(): Boolean = accessor.enableBackgroundExecutor()

/**
* Clean yoga node when <TextInput /> does not change.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<42c6f880b8d84f9c7b232f8ea392eed2>>
* @generated SignedSource<<bd5baae4bc2e8a619f99dea15766e803>>
*/

/**
Expand All @@ -25,7 +25,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
private var allowRecursiveCommitsWithSynchronousMountOnAndroidCache: Boolean? = null
private var batchRenderingUpdatesInEventLoopCache: Boolean? = null
private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null
private var enableBackgroundExecutorCache: Boolean? = null
private var enableCleanTextInputYogaNodeCache: Boolean? = null
private var enableGranularShadowTreeStateReconciliationCache: Boolean? = null
private var enableMicrotasksCache: Boolean? = null
Expand Down Expand Up @@ -94,15 +93,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
return cached
}

override fun enableBackgroundExecutor(): Boolean {
var cached = enableBackgroundExecutorCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.enableBackgroundExecutor()
enableBackgroundExecutorCache = cached
}
return cached
}

override fun enableCleanTextInputYogaNode(): Boolean {
var cached = enableCleanTextInputYogaNodeCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<46dae6ea607040efd2fc55f7ef3594df>>
* @generated SignedSource<<317e652e32f680ed7cfa4989a8133dad>>
*/

/**
Expand Down Expand Up @@ -38,8 +38,6 @@ public object ReactNativeFeatureFlagsCxxInterop {

@DoNotStrip @JvmStatic public external fun destroyFabricSurfacesInReactInstanceManager(): Boolean

@DoNotStrip @JvmStatic public external fun enableBackgroundExecutor(): Boolean

@DoNotStrip @JvmStatic public external fun enableCleanTextInputYogaNode(): Boolean

@DoNotStrip @JvmStatic public external fun enableGranularShadowTreeStateReconciliation(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<eeaa1e6cd97dd1dd4de7ee498ce6c30a>>
* @generated SignedSource<<9821cf51f5220e5a6e121044d024e1e6>>
*/

/**
Expand Down Expand Up @@ -33,8 +33,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi

override fun destroyFabricSurfacesInReactInstanceManager(): Boolean = false

override fun enableBackgroundExecutor(): Boolean = false

override fun enableCleanTextInputYogaNode(): Boolean = false

override fun enableGranularShadowTreeStateReconciliation(): Boolean = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<5d4631b6ae53f2bb2cfc44bad2f05980>>
* @generated SignedSource<<1f61054f14a12ed03d8ee5f32221ec1f>>
*/

/**
Expand All @@ -29,7 +29,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
private var allowRecursiveCommitsWithSynchronousMountOnAndroidCache: Boolean? = null
private var batchRenderingUpdatesInEventLoopCache: Boolean? = null
private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null
private var enableBackgroundExecutorCache: Boolean? = null
private var enableCleanTextInputYogaNodeCache: Boolean? = null
private var enableGranularShadowTreeStateReconciliationCache: Boolean? = null
private var enableMicrotasksCache: Boolean? = null
Expand Down Expand Up @@ -103,16 +102,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
return cached
}

override fun enableBackgroundExecutor(): Boolean {
var cached = enableBackgroundExecutorCache
if (cached == null) {
cached = currentProvider.enableBackgroundExecutor()
accessedFeatureFlags.add("enableBackgroundExecutor")
enableBackgroundExecutorCache = cached
}
return cached
}

override fun enableCleanTextInputYogaNode(): Boolean {
var cached = enableCleanTextInputYogaNodeCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<53a55d7cae6f18a4192f28a6f44b0c3b>>
* @generated SignedSource<<a3ee4e4eae374959d5211897be02b983>>
*/

/**
Expand Down Expand Up @@ -33,8 +33,6 @@ public interface ReactNativeFeatureFlagsProvider {

@DoNotStrip public fun destroyFabricSurfacesInReactInstanceManager(): Boolean

@DoNotStrip public fun enableBackgroundExecutor(): Boolean

@DoNotStrip public fun enableCleanTextInputYogaNode(): Boolean

@DoNotStrip public fun enableGranularShadowTreeStateReconciliation(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "EventBeatManager.h"
#include "EventEmitterWrapper.h"
#include "FabricMountingManager.h"
#include "JBackgroundExecutor.h"
#include "ReactNativeConfigHolder.h"
#include "SurfaceHandlerBinding.h"

Expand Down Expand Up @@ -416,11 +415,6 @@ void Binding::installFabricUIManager(

toolbox.asynchronousEventBeatFactory = asynchronousBeatFactory;

if (ReactNativeFeatureFlags::enableBackgroundExecutor()) {
backgroundExecutor_ = JBackgroundExecutor::create("fabric_bg");
toolbox.backgroundExecutor = backgroundExecutor_;
}

animationDriver_ = std::make_shared<LayoutAnimationDriver>(
runtimeExecutor, contextContainer, this);
scheduler_ =
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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<<9eee86e80b454c80ba6c64efe2a5fcac>>
* @generated SignedSource<<03c48c7281afa746734af581d6a17aa3>>
*/

/**
Expand Down Expand Up @@ -69,12 +69,6 @@ class ReactNativeFeatureFlagsProviderHolder
return method(javaProvider_);
}

bool enableBackgroundExecutor() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableBackgroundExecutor");
return method(javaProvider_);
}

bool enableCleanTextInputYogaNode() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableCleanTextInputYogaNode");
Expand Down Expand Up @@ -236,11 +230,6 @@ bool JReactNativeFeatureFlagsCxxInterop::destroyFabricSurfacesInReactInstanceMan
return ReactNativeFeatureFlags::destroyFabricSurfacesInReactInstanceManager();
}

bool JReactNativeFeatureFlagsCxxInterop::enableBackgroundExecutor(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableBackgroundExecutor();
}

bool JReactNativeFeatureFlagsCxxInterop::enableCleanTextInputYogaNode(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableCleanTextInputYogaNode();
Expand Down Expand Up @@ -383,9 +372,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"destroyFabricSurfacesInReactInstanceManager",
JReactNativeFeatureFlagsCxxInterop::destroyFabricSurfacesInReactInstanceManager),
makeNativeMethod(
"enableBackgroundExecutor",
JReactNativeFeatureFlagsCxxInterop::enableBackgroundExecutor),
makeNativeMethod(
"enableCleanTextInputYogaNode",
JReactNativeFeatureFlagsCxxInterop::enableCleanTextInputYogaNode),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<7702364bf684f25181e821004dba5383>>
* @generated SignedSource<<37f8ec65fb26fc58260a5846ab933098>>
*/

/**
Expand Down Expand Up @@ -45,9 +45,6 @@ class JReactNativeFeatureFlagsCxxInterop
static bool destroyFabricSurfacesInReactInstanceManager(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool enableBackgroundExecutor(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool enableCleanTextInputYogaNode(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

Expand Down
Loading