Skip to content

Commit b40b3b3

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
delete feature flag enableCustomDrawOrderFabric (facebook#44231)
Summary: Pull Request resolved: facebook#44231 changelog: [internal] The flag is not used and is statically set to false, let's delete it. Reviewed By: NickGerleman Differential Revision: D56473851 fbshipit-source-id: fe1076d20a765ffed2437f080764f2b5fe060bb6
1 parent 0dbe6f1 commit b40b3b3

20 files changed

+33
-138
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<4adf12f2d6a102944b0fa922aa1c3e84>>
7+
* @generated SignedSource<<9eadcbd838fd9cda33485db003c23f15>>
88
*/
99

1010
/**
@@ -64,12 +64,6 @@ public object ReactNativeFeatureFlags {
6464
@JvmStatic
6565
public fun enableCleanTextInputYogaNode(): Boolean = accessor.enableCleanTextInputYogaNode()
6666

67-
/**
68-
* When enabled, Fabric will use customDrawOrder in ReactViewGroup (similar to old architecture).
69-
*/
70-
@JvmStatic
71-
public fun enableCustomDrawOrderFabric(): Boolean = accessor.enableCustomDrawOrderFabric()
72-
7367
/**
7468
* Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution).
7569
*/

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<24c24962f08ba7c52c296a5ac9abdbbc>>
7+
* @generated SignedSource<<0a9209f5ccc8bb15801c53978f8e8543>>
88
*/
99

1010
/**
@@ -26,7 +26,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
2626
private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null
2727
private var enableBackgroundExecutorCache: Boolean? = null
2828
private var enableCleanTextInputYogaNodeCache: Boolean? = null
29-
private var enableCustomDrawOrderFabricCache: Boolean? = null
3029
private var enableMicrotasksCache: Boolean? = null
3130
private var enableSpannableBuildingUnificationCache: Boolean? = null
3231
private var enableSynchronousStateUpdatesCache: Boolean? = null
@@ -94,15 +93,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
9493
return cached
9594
}
9695

97-
override fun enableCustomDrawOrderFabric(): Boolean {
98-
var cached = enableCustomDrawOrderFabricCache
99-
if (cached == null) {
100-
cached = ReactNativeFeatureFlagsCxxInterop.enableCustomDrawOrderFabric()
101-
enableCustomDrawOrderFabricCache = cached
102-
}
103-
return cached
104-
}
105-
10696
override fun enableMicrotasks(): Boolean {
10797
var cached = enableMicrotasksCache
10898
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<0ceccc453595057ca96d9ae49c7f4637>>
7+
* @generated SignedSource<<3c144393313cb8746474c172c9313a0f>>
88
*/
99

1010
/**
@@ -40,8 +40,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
4040

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

43-
@DoNotStrip @JvmStatic public external fun enableCustomDrawOrderFabric(): Boolean
44-
4543
@DoNotStrip @JvmStatic public external fun enableMicrotasks(): Boolean
4644

4745
@DoNotStrip @JvmStatic public external fun enableSpannableBuildingUnification(): Boolean

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<29720cb2aa02ebdbe8e5efbe9e3a4b01>>
7+
* @generated SignedSource<<201a7ad4db3884cb51719684c4279d58>>
88
*/
99

1010
/**
@@ -35,8 +35,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
3535

3636
override fun enableCleanTextInputYogaNode(): Boolean = false
3737

38-
override fun enableCustomDrawOrderFabric(): Boolean = false
39-
4038
override fun enableMicrotasks(): Boolean = false
4139

4240
override fun enableSpannableBuildingUnification(): Boolean = false

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<977c8d88557a37c750ec59e67c94878c>>
7+
* @generated SignedSource<<a5880a25b1c555713b7bf55e61a39a3d>>
88
*/
99

1010
/**
@@ -30,7 +30,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
3030
private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null
3131
private var enableBackgroundExecutorCache: Boolean? = null
3232
private var enableCleanTextInputYogaNodeCache: Boolean? = null
33-
private var enableCustomDrawOrderFabricCache: Boolean? = null
3433
private var enableMicrotasksCache: Boolean? = null
3534
private var enableSpannableBuildingUnificationCache: Boolean? = null
3635
private var enableSynchronousStateUpdatesCache: Boolean? = null
@@ -104,16 +103,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
104103
return cached
105104
}
106105

107-
override fun enableCustomDrawOrderFabric(): Boolean {
108-
var cached = enableCustomDrawOrderFabricCache
109-
if (cached == null) {
110-
cached = currentProvider.enableCustomDrawOrderFabric()
111-
accessedFeatureFlags.add("enableCustomDrawOrderFabric")
112-
enableCustomDrawOrderFabricCache = cached
113-
}
114-
return cached
115-
}
116-
117106
override fun enableMicrotasks(): Boolean {
118107
var cached = enableMicrotasksCache
119108
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<a76816db2d7d7d3f0463103387e2a049>>
7+
* @generated SignedSource<<5594e9b51122080fbb3cbda8f5367abf>>
88
*/
99

1010
/**
@@ -35,8 +35,6 @@ public interface ReactNativeFeatureFlagsProvider {
3535

3636
@DoNotStrip public fun enableCleanTextInputYogaNode(): Boolean
3737

38-
@DoNotStrip public fun enableCustomDrawOrderFabric(): Boolean
39-
4038
@DoNotStrip public fun enableMicrotasks(): Boolean
4139

4240
@DoNotStrip public fun enableSpannableBuildingUnification(): Boolean

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import com.facebook.react.bridge.ReactSoftExceptionLogger;
3333
import com.facebook.react.bridge.UiThreadUtil;
3434
import com.facebook.react.common.annotations.VisibleForTesting;
35-
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags;
3635
import com.facebook.react.modules.i18nmanager.I18nUtil;
3736
import com.facebook.react.touch.OnInterceptTouchEventListener;
3837
import com.facebook.react.touch.ReactHitSlopView;
@@ -510,11 +509,9 @@ private boolean customDrawOrderDisabled() {
510509
if (getId() == NO_ID) {
511510
return false;
512511
}
513-
if (ViewUtil.getUIManagerType(getId()) != UIManagerType.FABRIC) {
514-
return false;
515-
}
516512

517-
return !ReactNativeFeatureFlags.enableCustomDrawOrderFabric();
513+
// Custom draw order is disabled for Fabric.
514+
return ViewUtil.getUIManagerType(getId()) == UIManagerType.FABRIC;
518515
}
519516

520517
private void handleAddView(View view) {

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<42365eadf2648e4033ec6be2c387c019>>
7+
* @generated SignedSource<<03c9714f0cdb99cbff20ba76b8deac87>>
88
*/
99

1010
/**
@@ -75,12 +75,6 @@ class ReactNativeFeatureFlagsProviderHolder
7575
return method(javaProvider_);
7676
}
7777

78-
bool enableCustomDrawOrderFabric() override {
79-
static const auto method =
80-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableCustomDrawOrderFabric");
81-
return method(javaProvider_);
82-
}
83-
8478
bool enableMicrotasks() override {
8579
static const auto method =
8680
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableMicrotasks");
@@ -187,11 +181,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableCleanTextInputYogaNode(
187181
return ReactNativeFeatureFlags::enableCleanTextInputYogaNode();
188182
}
189183

190-
bool JReactNativeFeatureFlagsCxxInterop::enableCustomDrawOrderFabric(
191-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
192-
return ReactNativeFeatureFlags::enableCustomDrawOrderFabric();
193-
}
194-
195184
bool JReactNativeFeatureFlagsCxxInterop::enableMicrotasks(
196185
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
197186
return ReactNativeFeatureFlags::enableMicrotasks();
@@ -287,9 +276,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
287276
makeNativeMethod(
288277
"enableCleanTextInputYogaNode",
289278
JReactNativeFeatureFlagsCxxInterop::enableCleanTextInputYogaNode),
290-
makeNativeMethod(
291-
"enableCustomDrawOrderFabric",
292-
JReactNativeFeatureFlagsCxxInterop::enableCustomDrawOrderFabric),
293279
makeNativeMethod(
294280
"enableMicrotasks",
295281
JReactNativeFeatureFlagsCxxInterop::enableMicrotasks),

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<dfdbec53de07274b4a95d51d74868686>>
7+
* @generated SignedSource<<f6a67c3d3c0b96645c3bd9684132389d>>
88
*/
99

1010
/**
@@ -48,9 +48,6 @@ class JReactNativeFeatureFlagsCxxInterop
4848
static bool enableCleanTextInputYogaNode(
4949
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
5050

51-
static bool enableCustomDrawOrderFabric(
52-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
53-
5451
static bool enableMicrotasks(
5552
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
5653

packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<43c8603042b627380cb5f6150e670753>>
7+
* @generated SignedSource<<fba1c2994faa122b60ee86cdc1ba5b70>>
88
*/
99

1010
/**
@@ -45,10 +45,6 @@ bool ReactNativeFeatureFlags::enableCleanTextInputYogaNode() {
4545
return getAccessor().enableCleanTextInputYogaNode();
4646
}
4747

48-
bool ReactNativeFeatureFlags::enableCustomDrawOrderFabric() {
49-
return getAccessor().enableCustomDrawOrderFabric();
50-
}
51-
5248
bool ReactNativeFeatureFlags::enableMicrotasks() {
5349
return getAccessor().enableMicrotasks();
5450
}

0 commit comments

Comments
 (0)