mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Cleanup background drawing feature flags (#46761)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46761 The legacy paths for this is all gone and non functional. We can clean thes up fully now. Changelog: [Internal] Reviewed By: rshest, Abbondanzo Differential Revision: D63652264 fbshipit-source-id: cabc1af0098553c64f834e6bc30000ef7a942a4c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1118cc6327
commit
267b250690
+1
-13
@@ -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<<346573dc832f9de6a2e29a4cfde558c5>>
|
||||
* @generated SignedSource<<fd4f2e6d21254dbbecdf7d71135d55a1>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -70,12 +70,6 @@ public object ReactNativeFeatureFlags {
|
||||
@JvmStatic
|
||||
public fun enableAndroidLineHeightCentering(): Boolean = accessor.enableAndroidLineHeightCentering()
|
||||
|
||||
/**
|
||||
* Use BackgroundStyleApplicator in place of other background/border drawing code
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun enableBackgroundStyleApplicator(): Boolean = accessor.enableBackgroundStyleApplicator()
|
||||
|
||||
/**
|
||||
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer.
|
||||
*/
|
||||
@@ -298,12 +292,6 @@ public object ReactNativeFeatureFlags {
|
||||
@JvmStatic
|
||||
public fun useNativeViewConfigsInBridgelessMode(): Boolean = accessor.useNativeViewConfigsInBridgelessMode()
|
||||
|
||||
/**
|
||||
* Use shared background drawing code for ReactImageView instead of using Fresco to manipulate the bitmap
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun useNewReactImageViewBackgroundDrawing(): Boolean = accessor.useNewReactImageViewBackgroundDrawing()
|
||||
|
||||
/**
|
||||
* Moves more of the work in view preallocation to the main thread to free up JS thread.
|
||||
*/
|
||||
|
||||
+1
-21
@@ -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<<71fd4a070f4eb1429f38221e34135062>>
|
||||
* @generated SignedSource<<09ac6b8a5ba873a85e861e54f49072b4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -27,7 +27,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
|
||||
private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null
|
||||
private var enableAlignItemsBaselineOnFabricIOSCache: Boolean? = null
|
||||
private var enableAndroidLineHeightCenteringCache: Boolean? = null
|
||||
private var enableBackgroundStyleApplicatorCache: Boolean? = null
|
||||
private var enableBridgelessArchitectureCache: Boolean? = null
|
||||
private var enableCleanTextInputYogaNodeCache: Boolean? = null
|
||||
private var enableDeletionOfUnmountedViewsCache: Boolean? = null
|
||||
@@ -65,7 +64,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
|
||||
private var useImmediateExecutorInAndroidBridgelessCache: Boolean? = null
|
||||
private var useModernRuntimeSchedulerCache: Boolean? = null
|
||||
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
|
||||
private var useNewReactImageViewBackgroundDrawingCache: Boolean? = null
|
||||
private var useOptimisedViewPreallocationOnAndroidCache: Boolean? = null
|
||||
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
|
||||
private var useRuntimeShadowNodeReferenceUpdateCache: Boolean? = null
|
||||
@@ -136,15 +134,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun enableBackgroundStyleApplicator(): Boolean {
|
||||
var cached = enableBackgroundStyleApplicatorCache
|
||||
if (cached == null) {
|
||||
cached = ReactNativeFeatureFlagsCxxInterop.enableBackgroundStyleApplicator()
|
||||
enableBackgroundStyleApplicatorCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun enableBridgelessArchitecture(): Boolean {
|
||||
var cached = enableBridgelessArchitectureCache
|
||||
if (cached == null) {
|
||||
@@ -478,15 +467,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useNewReactImageViewBackgroundDrawing(): Boolean {
|
||||
var cached = useNewReactImageViewBackgroundDrawingCache
|
||||
if (cached == null) {
|
||||
cached = ReactNativeFeatureFlagsCxxInterop.useNewReactImageViewBackgroundDrawing()
|
||||
useNewReactImageViewBackgroundDrawingCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useOptimisedViewPreallocationOnAndroid(): Boolean {
|
||||
var cached = useOptimisedViewPreallocationOnAndroidCache
|
||||
if (cached == null) {
|
||||
|
||||
+1
-5
@@ -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<<c35eeb0695671be65b1543ea0664468b>>
|
||||
* @generated SignedSource<<4ad77e7f64acc11e5a5f867f94d84b46>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -42,8 +42,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun enableAndroidLineHeightCentering(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun enableBackgroundStyleApplicator(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun enableBridgelessArchitecture(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun enableCleanTextInputYogaNode(): Boolean
|
||||
@@ -118,8 +116,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useNativeViewConfigsInBridgelessMode(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useNewReactImageViewBackgroundDrawing(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useOptimisedViewPreallocationOnAndroid(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useOptimizedEventBatchingOnAndroid(): Boolean
|
||||
|
||||
+1
-5
@@ -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<<e1352f772c20f824f636f1f73a541444>>
|
||||
* @generated SignedSource<<f5ccd2e9c8f13f45e9dec1dc3fc2c325>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -37,8 +37,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun enableAndroidLineHeightCentering(): Boolean = false
|
||||
|
||||
override fun enableBackgroundStyleApplicator(): Boolean = true
|
||||
|
||||
override fun enableBridgelessArchitecture(): Boolean = false
|
||||
|
||||
override fun enableCleanTextInputYogaNode(): Boolean = false
|
||||
@@ -113,8 +111,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun useNativeViewConfigsInBridgelessMode(): Boolean = false
|
||||
|
||||
override fun useNewReactImageViewBackgroundDrawing(): Boolean = false
|
||||
|
||||
override fun useOptimisedViewPreallocationOnAndroid(): Boolean = false
|
||||
|
||||
override fun useOptimizedEventBatchingOnAndroid(): Boolean = false
|
||||
|
||||
+1
-23
@@ -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<<0d8f65a06ed20f44e5de58b764635602>>
|
||||
* @generated SignedSource<<a18b2e5cc10909f0cf7ec402f14da1e1>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -31,7 +31,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
|
||||
private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null
|
||||
private var enableAlignItemsBaselineOnFabricIOSCache: Boolean? = null
|
||||
private var enableAndroidLineHeightCenteringCache: Boolean? = null
|
||||
private var enableBackgroundStyleApplicatorCache: Boolean? = null
|
||||
private var enableBridgelessArchitectureCache: Boolean? = null
|
||||
private var enableCleanTextInputYogaNodeCache: Boolean? = null
|
||||
private var enableDeletionOfUnmountedViewsCache: Boolean? = null
|
||||
@@ -69,7 +68,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
|
||||
private var useImmediateExecutorInAndroidBridgelessCache: Boolean? = null
|
||||
private var useModernRuntimeSchedulerCache: Boolean? = null
|
||||
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
|
||||
private var useNewReactImageViewBackgroundDrawingCache: Boolean? = null
|
||||
private var useOptimisedViewPreallocationOnAndroidCache: Boolean? = null
|
||||
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
|
||||
private var useRuntimeShadowNodeReferenceUpdateCache: Boolean? = null
|
||||
@@ -147,16 +145,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun enableBackgroundStyleApplicator(): Boolean {
|
||||
var cached = enableBackgroundStyleApplicatorCache
|
||||
if (cached == null) {
|
||||
cached = currentProvider.enableBackgroundStyleApplicator()
|
||||
accessedFeatureFlags.add("enableBackgroundStyleApplicator")
|
||||
enableBackgroundStyleApplicatorCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun enableBridgelessArchitecture(): Boolean {
|
||||
var cached = enableBridgelessArchitectureCache
|
||||
if (cached == null) {
|
||||
@@ -527,16 +515,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useNewReactImageViewBackgroundDrawing(): Boolean {
|
||||
var cached = useNewReactImageViewBackgroundDrawingCache
|
||||
if (cached == null) {
|
||||
cached = currentProvider.useNewReactImageViewBackgroundDrawing()
|
||||
accessedFeatureFlags.add("useNewReactImageViewBackgroundDrawing")
|
||||
useNewReactImageViewBackgroundDrawingCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useOptimisedViewPreallocationOnAndroid(): Boolean {
|
||||
var cached = useOptimisedViewPreallocationOnAndroidCache
|
||||
if (cached == null) {
|
||||
|
||||
+1
-5
@@ -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<<6d70976da58a1120c79704210899b893>>
|
||||
* @generated SignedSource<<e7b189bf53c3922b51623e8c76a5059c>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -37,8 +37,6 @@ public interface ReactNativeFeatureFlagsProvider {
|
||||
|
||||
@DoNotStrip public fun enableAndroidLineHeightCentering(): Boolean
|
||||
|
||||
@DoNotStrip public fun enableBackgroundStyleApplicator(): Boolean
|
||||
|
||||
@DoNotStrip public fun enableBridgelessArchitecture(): Boolean
|
||||
|
||||
@DoNotStrip public fun enableCleanTextInputYogaNode(): Boolean
|
||||
@@ -113,8 +111,6 @@ public interface ReactNativeFeatureFlagsProvider {
|
||||
|
||||
@DoNotStrip public fun useNativeViewConfigsInBridgelessMode(): Boolean
|
||||
|
||||
@DoNotStrip public fun useNewReactImageViewBackgroundDrawing(): Boolean
|
||||
|
||||
@DoNotStrip public fun useOptimisedViewPreallocationOnAndroid(): Boolean
|
||||
|
||||
@DoNotStrip public fun useOptimizedEventBatchingOnAndroid(): Boolean
|
||||
|
||||
+7
-16
@@ -27,7 +27,6 @@ import com.facebook.react.bridge.ReadableMapKeySetIterator;
|
||||
import com.facebook.react.bridge.ReadableType;
|
||||
import com.facebook.react.common.MapBuilder;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags;
|
||||
import com.facebook.react.uimanager.ReactAccessibilityDelegate.AccessibilityRole;
|
||||
import com.facebook.react.uimanager.ReactAccessibilityDelegate.Role;
|
||||
import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
@@ -789,33 +788,25 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
|
||||
|
||||
@ReactProp(name = ViewProps.OUTLINE_COLOR, customType = "Color")
|
||||
public void setOutlineColor(T view, @Nullable Integer color) {
|
||||
if (ReactNativeFeatureFlags.enableBackgroundStyleApplicator()) {
|
||||
BackgroundStyleApplicator.setOutlineColor(view, color);
|
||||
}
|
||||
BackgroundStyleApplicator.setOutlineColor(view, color);
|
||||
}
|
||||
|
||||
@ReactProp(name = ViewProps.OUTLINE_OFFSET)
|
||||
public void setOutlineOffset(T view, float offset) {
|
||||
if (ReactNativeFeatureFlags.enableBackgroundStyleApplicator()) {
|
||||
BackgroundStyleApplicator.setOutlineOffset(view, offset);
|
||||
}
|
||||
BackgroundStyleApplicator.setOutlineOffset(view, offset);
|
||||
}
|
||||
|
||||
@ReactProp(name = ViewProps.OUTLINE_STYLE)
|
||||
public void setOutlineStyle(T view, @Nullable String outlineStyle) {
|
||||
if (ReactNativeFeatureFlags.enableBackgroundStyleApplicator()) {
|
||||
@Nullable
|
||||
OutlineStyle parsedOutlineStyle =
|
||||
outlineStyle == null ? null : OutlineStyle.fromString(outlineStyle);
|
||||
BackgroundStyleApplicator.setOutlineStyle(view, parsedOutlineStyle);
|
||||
}
|
||||
@Nullable
|
||||
OutlineStyle parsedOutlineStyle =
|
||||
outlineStyle == null ? null : OutlineStyle.fromString(outlineStyle);
|
||||
BackgroundStyleApplicator.setOutlineStyle(view, parsedOutlineStyle);
|
||||
}
|
||||
|
||||
@ReactProp(name = ViewProps.OUTLINE_WIDTH)
|
||||
public void setOutlineWidth(T view, float width) {
|
||||
if (ReactNativeFeatureFlags.enableBackgroundStyleApplicator()) {
|
||||
BackgroundStyleApplicator.setOutlineWidth(view, width);
|
||||
}
|
||||
BackgroundStyleApplicator.setOutlineWidth(view, width);
|
||||
}
|
||||
|
||||
private void logUnsupportedPropertyWarning(String propName) {
|
||||
|
||||
+1
-29
@@ -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<<1f027e4e66bce1536fb259a547bb6a00>>
|
||||
* @generated SignedSource<<c5c4b3c80b6e4d79933d8de8ee4f22a7>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -81,12 +81,6 @@ class ReactNativeFeatureFlagsProviderHolder
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool enableBackgroundStyleApplicator() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableBackgroundStyleApplicator");
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool enableBridgelessArchitecture() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableBridgelessArchitecture");
|
||||
@@ -309,12 +303,6 @@ class ReactNativeFeatureFlagsProviderHolder
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool useNewReactImageViewBackgroundDrawing() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useNewReactImageViewBackgroundDrawing");
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool useOptimisedViewPreallocationOnAndroid() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useOptimisedViewPreallocationOnAndroid");
|
||||
@@ -390,11 +378,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableAndroidLineHeightCentering(
|
||||
return ReactNativeFeatureFlags::enableAndroidLineHeightCentering();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::enableBackgroundStyleApplicator(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::enableBackgroundStyleApplicator();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::enableBridgelessArchitecture(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::enableBridgelessArchitecture();
|
||||
@@ -580,11 +563,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode(
|
||||
return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::useNewReactImageViewBackgroundDrawing(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::useNewReactImageViewBackgroundDrawing();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::useOptimisedViewPreallocationOnAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::useOptimisedViewPreallocationOnAndroid();
|
||||
@@ -653,9 +631,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"enableAndroidLineHeightCentering",
|
||||
JReactNativeFeatureFlagsCxxInterop::enableAndroidLineHeightCentering),
|
||||
makeNativeMethod(
|
||||
"enableBackgroundStyleApplicator",
|
||||
JReactNativeFeatureFlagsCxxInterop::enableBackgroundStyleApplicator),
|
||||
makeNativeMethod(
|
||||
"enableBridgelessArchitecture",
|
||||
JReactNativeFeatureFlagsCxxInterop::enableBridgelessArchitecture),
|
||||
@@ -767,9 +742,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"useNativeViewConfigsInBridgelessMode",
|
||||
JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode),
|
||||
makeNativeMethod(
|
||||
"useNewReactImageViewBackgroundDrawing",
|
||||
JReactNativeFeatureFlagsCxxInterop::useNewReactImageViewBackgroundDrawing),
|
||||
makeNativeMethod(
|
||||
"useOptimisedViewPreallocationOnAndroid",
|
||||
JReactNativeFeatureFlagsCxxInterop::useOptimisedViewPreallocationOnAndroid),
|
||||
|
||||
+1
-7
@@ -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<<b99b1f3a29b875f4c456f77a276f4db3>>
|
||||
* @generated SignedSource<<9514754227bf797622d6085de2470a86>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -51,9 +51,6 @@ class JReactNativeFeatureFlagsCxxInterop
|
||||
static bool enableAndroidLineHeightCentering(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool enableBackgroundStyleApplicator(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool enableBridgelessArchitecture(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
@@ -165,9 +162,6 @@ class JReactNativeFeatureFlagsCxxInterop
|
||||
static bool useNativeViewConfigsInBridgelessMode(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool useNewReactImageViewBackgroundDrawing(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool useOptimisedViewPreallocationOnAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
|
||||
@@ -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<<4efee607ab3716723debee8a451604ef>>
|
||||
* @generated SignedSource<<844f004ddce387b7e65bd6e551f566fa>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -49,10 +49,6 @@ bool ReactNativeFeatureFlags::enableAndroidLineHeightCentering() {
|
||||
return getAccessor().enableAndroidLineHeightCentering();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::enableBackgroundStyleApplicator() {
|
||||
return getAccessor().enableBackgroundStyleApplicator();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::enableBridgelessArchitecture() {
|
||||
return getAccessor().enableBridgelessArchitecture();
|
||||
}
|
||||
@@ -201,10 +197,6 @@ bool ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode() {
|
||||
return getAccessor().useNativeViewConfigsInBridgelessMode();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::useNewReactImageViewBackgroundDrawing() {
|
||||
return getAccessor().useNewReactImageViewBackgroundDrawing();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::useOptimisedViewPreallocationOnAndroid() {
|
||||
return getAccessor().useOptimisedViewPreallocationOnAndroid();
|
||||
}
|
||||
|
||||
@@ -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<<d2afeedcfb81ca31bd7f0c19fd406ae6>>
|
||||
* @generated SignedSource<<284402d1a83bfc5e8ae0a4619c61e130>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -72,11 +72,6 @@ class ReactNativeFeatureFlags {
|
||||
*/
|
||||
RN_EXPORT static bool enableAndroidLineHeightCentering();
|
||||
|
||||
/**
|
||||
* Use BackgroundStyleApplicator in place of other background/border drawing code
|
||||
*/
|
||||
RN_EXPORT static bool enableBackgroundStyleApplicator();
|
||||
|
||||
/**
|
||||
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer.
|
||||
*/
|
||||
@@ -262,11 +257,6 @@ class ReactNativeFeatureFlags {
|
||||
*/
|
||||
RN_EXPORT static bool useNativeViewConfigsInBridgelessMode();
|
||||
|
||||
/**
|
||||
* Use shared background drawing code for ReactImageView instead of using Fresco to manipulate the bitmap
|
||||
*/
|
||||
RN_EXPORT static bool useNewReactImageViewBackgroundDrawing();
|
||||
|
||||
/**
|
||||
* Moves more of the work in view preallocation to the main thread to free up JS thread.
|
||||
*/
|
||||
|
||||
+44
-80
@@ -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<<1bbb59bff4ce77b34ee94d0a2095d71f>>
|
||||
* @generated SignedSource<<4b891cd3ef89b709046557282f13cefc>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -155,24 +155,6 @@ bool ReactNativeFeatureFlagsAccessor::enableAndroidLineHeightCentering() {
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::enableBackgroundStyleApplicator() {
|
||||
auto flagValue = enableBackgroundStyleApplicator_.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(7, "enableBackgroundStyleApplicator");
|
||||
|
||||
flagValue = currentProvider_->enableBackgroundStyleApplicator();
|
||||
enableBackgroundStyleApplicator_ = flagValue;
|
||||
}
|
||||
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::enableBridgelessArchitecture() {
|
||||
auto flagValue = enableBridgelessArchitecture_.load();
|
||||
|
||||
@@ -182,7 +164,7 @@ bool ReactNativeFeatureFlagsAccessor::enableBridgelessArchitecture() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(8, "enableBridgelessArchitecture");
|
||||
markFlagAsAccessed(7, "enableBridgelessArchitecture");
|
||||
|
||||
flagValue = currentProvider_->enableBridgelessArchitecture();
|
||||
enableBridgelessArchitecture_ = flagValue;
|
||||
@@ -200,7 +182,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(9, "enableCleanTextInputYogaNode");
|
||||
markFlagAsAccessed(8, "enableCleanTextInputYogaNode");
|
||||
|
||||
flagValue = currentProvider_->enableCleanTextInputYogaNode();
|
||||
enableCleanTextInputYogaNode_ = flagValue;
|
||||
@@ -218,7 +200,7 @@ bool ReactNativeFeatureFlagsAccessor::enableDeletionOfUnmountedViews() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(10, "enableDeletionOfUnmountedViews");
|
||||
markFlagAsAccessed(9, "enableDeletionOfUnmountedViews");
|
||||
|
||||
flagValue = currentProvider_->enableDeletionOfUnmountedViews();
|
||||
enableDeletionOfUnmountedViews_ = flagValue;
|
||||
@@ -236,7 +218,7 @@ bool ReactNativeFeatureFlagsAccessor::enableEagerRootViewAttachment() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(11, "enableEagerRootViewAttachment");
|
||||
markFlagAsAccessed(10, "enableEagerRootViewAttachment");
|
||||
|
||||
flagValue = currentProvider_->enableEagerRootViewAttachment();
|
||||
enableEagerRootViewAttachment_ = flagValue;
|
||||
@@ -254,7 +236,7 @@ bool ReactNativeFeatureFlagsAccessor::enableEventEmitterRetentionDuringGesturesO
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(12, "enableEventEmitterRetentionDuringGesturesOnAndroid");
|
||||
markFlagAsAccessed(11, "enableEventEmitterRetentionDuringGesturesOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->enableEventEmitterRetentionDuringGesturesOnAndroid();
|
||||
enableEventEmitterRetentionDuringGesturesOnAndroid_ = flagValue;
|
||||
@@ -272,7 +254,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricLogs() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(13, "enableFabricLogs");
|
||||
markFlagAsAccessed(12, "enableFabricLogs");
|
||||
|
||||
flagValue = currentProvider_->enableFabricLogs();
|
||||
enableFabricLogs_ = flagValue;
|
||||
@@ -290,7 +272,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricRenderer() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(14, "enableFabricRenderer");
|
||||
markFlagAsAccessed(13, "enableFabricRenderer");
|
||||
|
||||
flagValue = currentProvider_->enableFabricRenderer();
|
||||
enableFabricRenderer_ = flagValue;
|
||||
@@ -308,7 +290,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricRendererExclusively() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(15, "enableFabricRendererExclusively");
|
||||
markFlagAsAccessed(14, "enableFabricRendererExclusively");
|
||||
|
||||
flagValue = currentProvider_->enableFabricRendererExclusively();
|
||||
enableFabricRendererExclusively_ = flagValue;
|
||||
@@ -326,7 +308,7 @@ bool ReactNativeFeatureFlagsAccessor::enableGranularShadowTreeStateReconciliatio
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(16, "enableGranularShadowTreeStateReconciliation");
|
||||
markFlagAsAccessed(15, "enableGranularShadowTreeStateReconciliation");
|
||||
|
||||
flagValue = currentProvider_->enableGranularShadowTreeStateReconciliation();
|
||||
enableGranularShadowTreeStateReconciliation_ = flagValue;
|
||||
@@ -344,7 +326,7 @@ bool ReactNativeFeatureFlagsAccessor::enableIOSViewClipToPaddingBox() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(17, "enableIOSViewClipToPaddingBox");
|
||||
markFlagAsAccessed(16, "enableIOSViewClipToPaddingBox");
|
||||
|
||||
flagValue = currentProvider_->enableIOSViewClipToPaddingBox();
|
||||
enableIOSViewClipToPaddingBox_ = flagValue;
|
||||
@@ -362,7 +344,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnIOS() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(18, "enableLayoutAnimationsOnIOS");
|
||||
markFlagAsAccessed(17, "enableLayoutAnimationsOnIOS");
|
||||
|
||||
flagValue = currentProvider_->enableLayoutAnimationsOnIOS();
|
||||
enableLayoutAnimationsOnIOS_ = flagValue;
|
||||
@@ -380,7 +362,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLongTaskAPI() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(19, "enableLongTaskAPI");
|
||||
markFlagAsAccessed(18, "enableLongTaskAPI");
|
||||
|
||||
flagValue = currentProvider_->enableLongTaskAPI();
|
||||
enableLongTaskAPI_ = flagValue;
|
||||
@@ -398,7 +380,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(20, "enableMicrotasks");
|
||||
markFlagAsAccessed(19, "enableMicrotasks");
|
||||
|
||||
flagValue = currentProvider_->enableMicrotasks();
|
||||
enableMicrotasks_ = flagValue;
|
||||
@@ -416,7 +398,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePreciseSchedulingForPremountItemsOnA
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(21, "enablePreciseSchedulingForPremountItemsOnAndroid");
|
||||
markFlagAsAccessed(20, "enablePreciseSchedulingForPremountItemsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->enablePreciseSchedulingForPremountItemsOnAndroid();
|
||||
enablePreciseSchedulingForPremountItemsOnAndroid_ = flagValue;
|
||||
@@ -434,7 +416,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePropsUpdateReconciliationAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(22, "enablePropsUpdateReconciliationAndroid");
|
||||
markFlagAsAccessed(21, "enablePropsUpdateReconciliationAndroid");
|
||||
|
||||
flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid();
|
||||
enablePropsUpdateReconciliationAndroid_ = flagValue;
|
||||
@@ -452,7 +434,7 @@ bool ReactNativeFeatureFlagsAccessor::enableReportEventPaintTime() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(23, "enableReportEventPaintTime");
|
||||
markFlagAsAccessed(22, "enableReportEventPaintTime");
|
||||
|
||||
flagValue = currentProvider_->enableReportEventPaintTime();
|
||||
enableReportEventPaintTime_ = flagValue;
|
||||
@@ -470,7 +452,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSynchronousStateUpdates() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(24, "enableSynchronousStateUpdates");
|
||||
markFlagAsAccessed(23, "enableSynchronousStateUpdates");
|
||||
|
||||
flagValue = currentProvider_->enableSynchronousStateUpdates();
|
||||
enableSynchronousStateUpdates_ = flagValue;
|
||||
@@ -488,7 +470,7 @@ bool ReactNativeFeatureFlagsAccessor::enableTextPreallocationOptimisation() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(25, "enableTextPreallocationOptimisation");
|
||||
markFlagAsAccessed(24, "enableTextPreallocationOptimisation");
|
||||
|
||||
flagValue = currentProvider_->enableTextPreallocationOptimisation();
|
||||
enableTextPreallocationOptimisation_ = flagValue;
|
||||
@@ -506,7 +488,7 @@ bool ReactNativeFeatureFlagsAccessor::enableUIConsistency() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(26, "enableUIConsistency");
|
||||
markFlagAsAccessed(25, "enableUIConsistency");
|
||||
|
||||
flagValue = currentProvider_->enableUIConsistency();
|
||||
enableUIConsistency_ = flagValue;
|
||||
@@ -524,7 +506,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecycling() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(27, "enableViewRecycling");
|
||||
markFlagAsAccessed(26, "enableViewRecycling");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecycling();
|
||||
enableViewRecycling_ = flagValue;
|
||||
@@ -542,7 +524,7 @@ bool ReactNativeFeatureFlagsAccessor::excludeYogaFromRawProps() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(28, "excludeYogaFromRawProps");
|
||||
markFlagAsAccessed(27, "excludeYogaFromRawProps");
|
||||
|
||||
flagValue = currentProvider_->excludeYogaFromRawProps();
|
||||
excludeYogaFromRawProps_ = flagValue;
|
||||
@@ -560,7 +542,7 @@ bool ReactNativeFeatureFlagsAccessor::fetchImagesInViewPreallocation() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(29, "fetchImagesInViewPreallocation");
|
||||
markFlagAsAccessed(28, "fetchImagesInViewPreallocation");
|
||||
|
||||
flagValue = currentProvider_->fetchImagesInViewPreallocation();
|
||||
fetchImagesInViewPreallocation_ = flagValue;
|
||||
@@ -578,7 +560,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(30, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
|
||||
markFlagAsAccessed(29, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
|
||||
|
||||
flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact();
|
||||
fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue;
|
||||
@@ -596,7 +578,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(31, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid");
|
||||
markFlagAsAccessed(30, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->fixMountingCoordinatorReportedPendingTransactionsOnAndroid();
|
||||
fixMountingCoordinatorReportedPendingTransactionsOnAndroid_ = flagValue;
|
||||
@@ -614,7 +596,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(32, "forceBatchingMountItemsOnAndroid");
|
||||
markFlagAsAccessed(31, "forceBatchingMountItemsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->forceBatchingMountItemsOnAndroid();
|
||||
forceBatchingMountItemsOnAndroid_ = flagValue;
|
||||
@@ -632,7 +614,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(33, "fuseboxEnabledDebug");
|
||||
markFlagAsAccessed(32, "fuseboxEnabledDebug");
|
||||
|
||||
flagValue = currentProvider_->fuseboxEnabledDebug();
|
||||
fuseboxEnabledDebug_ = flagValue;
|
||||
@@ -650,7 +632,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(34, "fuseboxEnabledRelease");
|
||||
markFlagAsAccessed(33, "fuseboxEnabledRelease");
|
||||
|
||||
flagValue = currentProvider_->fuseboxEnabledRelease();
|
||||
fuseboxEnabledRelease_ = flagValue;
|
||||
@@ -668,7 +650,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(35, "initEagerTurboModulesOnNativeModulesQueueAndroid");
|
||||
markFlagAsAccessed(34, "initEagerTurboModulesOnNativeModulesQueueAndroid");
|
||||
|
||||
flagValue = currentProvider_->initEagerTurboModulesOnNativeModulesQueueAndroid();
|
||||
initEagerTurboModulesOnNativeModulesQueueAndroid_ = flagValue;
|
||||
@@ -686,7 +668,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(36, "lazyAnimationCallbacks");
|
||||
markFlagAsAccessed(35, "lazyAnimationCallbacks");
|
||||
|
||||
flagValue = currentProvider_->lazyAnimationCallbacks();
|
||||
lazyAnimationCallbacks_ = flagValue;
|
||||
@@ -704,7 +686,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(37, "loadVectorDrawablesOnImages");
|
||||
markFlagAsAccessed(36, "loadVectorDrawablesOnImages");
|
||||
|
||||
flagValue = currentProvider_->loadVectorDrawablesOnImages();
|
||||
loadVectorDrawablesOnImages_ = flagValue;
|
||||
@@ -722,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::removeNestedCallsToDispatchMountItemsOnAnd
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(38, "removeNestedCallsToDispatchMountItemsOnAndroid");
|
||||
markFlagAsAccessed(37, "removeNestedCallsToDispatchMountItemsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->removeNestedCallsToDispatchMountItemsOnAndroid();
|
||||
removeNestedCallsToDispatchMountItemsOnAndroid_ = flagValue;
|
||||
@@ -740,7 +722,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(39, "setAndroidLayoutDirection");
|
||||
markFlagAsAccessed(38, "setAndroidLayoutDirection");
|
||||
|
||||
flagValue = currentProvider_->setAndroidLayoutDirection();
|
||||
setAndroidLayoutDirection_ = flagValue;
|
||||
@@ -758,7 +740,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(40, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
markFlagAsAccessed(39, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
|
||||
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
|
||||
@@ -776,7 +758,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(41, "useFabricInterop");
|
||||
markFlagAsAccessed(40, "useFabricInterop");
|
||||
|
||||
flagValue = currentProvider_->useFabricInterop();
|
||||
useFabricInterop_ = flagValue;
|
||||
@@ -794,7 +776,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(42, "useImmediateExecutorInAndroidBridgeless");
|
||||
markFlagAsAccessed(41, "useImmediateExecutorInAndroidBridgeless");
|
||||
|
||||
flagValue = currentProvider_->useImmediateExecutorInAndroidBridgeless();
|
||||
useImmediateExecutorInAndroidBridgeless_ = flagValue;
|
||||
@@ -812,7 +794,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(43, "useModernRuntimeScheduler");
|
||||
markFlagAsAccessed(42, "useModernRuntimeScheduler");
|
||||
|
||||
flagValue = currentProvider_->useModernRuntimeScheduler();
|
||||
useModernRuntimeScheduler_ = flagValue;
|
||||
@@ -830,7 +812,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(44, "useNativeViewConfigsInBridgelessMode");
|
||||
markFlagAsAccessed(43, "useNativeViewConfigsInBridgelessMode");
|
||||
|
||||
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
|
||||
useNativeViewConfigsInBridgelessMode_ = flagValue;
|
||||
@@ -839,24 +821,6 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::useNewReactImageViewBackgroundDrawing() {
|
||||
auto flagValue = useNewReactImageViewBackgroundDrawing_.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(45, "useNewReactImageViewBackgroundDrawing");
|
||||
|
||||
flagValue = currentProvider_->useNewReactImageViewBackgroundDrawing();
|
||||
useNewReactImageViewBackgroundDrawing_ = flagValue;
|
||||
}
|
||||
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::useOptimisedViewPreallocationOnAndroid() {
|
||||
auto flagValue = useOptimisedViewPreallocationOnAndroid_.load();
|
||||
|
||||
@@ -866,7 +830,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(46, "useOptimisedViewPreallocationOnAndroid");
|
||||
markFlagAsAccessed(44, "useOptimisedViewPreallocationOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useOptimisedViewPreallocationOnAndroid();
|
||||
useOptimisedViewPreallocationOnAndroid_ = flagValue;
|
||||
@@ -884,7 +848,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(47, "useOptimizedEventBatchingOnAndroid");
|
||||
markFlagAsAccessed(45, "useOptimizedEventBatchingOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
|
||||
useOptimizedEventBatchingOnAndroid_ = flagValue;
|
||||
@@ -902,7 +866,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(48, "useRuntimeShadowNodeReferenceUpdate");
|
||||
markFlagAsAccessed(46, "useRuntimeShadowNodeReferenceUpdate");
|
||||
|
||||
flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdate();
|
||||
useRuntimeShadowNodeReferenceUpdate_ = flagValue;
|
||||
@@ -920,7 +884,7 @@ bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdateOnLayou
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(49, "useRuntimeShadowNodeReferenceUpdateOnLayout");
|
||||
markFlagAsAccessed(47, "useRuntimeShadowNodeReferenceUpdateOnLayout");
|
||||
|
||||
flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdateOnLayout();
|
||||
useRuntimeShadowNodeReferenceUpdateOnLayout_ = flagValue;
|
||||
@@ -938,7 +902,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(50, "useTurboModuleInterop");
|
||||
markFlagAsAccessed(48, "useTurboModuleInterop");
|
||||
|
||||
flagValue = currentProvider_->useTurboModuleInterop();
|
||||
useTurboModuleInterop_ = flagValue;
|
||||
@@ -956,7 +920,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(51, "useTurboModules");
|
||||
markFlagAsAccessed(49, "useTurboModules");
|
||||
|
||||
flagValue = currentProvider_->useTurboModules();
|
||||
useTurboModules_ = flagValue;
|
||||
|
||||
+2
-6
@@ -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<<5c64457d2fbe154d7e57b3e3e2e6a33a>>
|
||||
* @generated SignedSource<<84feecb4e94dfdc9fe6bd7ebb9d5a6de>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,6 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
bool destroyFabricSurfacesInReactInstanceManager();
|
||||
bool enableAlignItemsBaselineOnFabricIOS();
|
||||
bool enableAndroidLineHeightCentering();
|
||||
bool enableBackgroundStyleApplicator();
|
||||
bool enableBridgelessArchitecture();
|
||||
bool enableCleanTextInputYogaNode();
|
||||
bool enableDeletionOfUnmountedViews();
|
||||
@@ -76,7 +75,6 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
bool useImmediateExecutorInAndroidBridgeless();
|
||||
bool useModernRuntimeScheduler();
|
||||
bool useNativeViewConfigsInBridgelessMode();
|
||||
bool useNewReactImageViewBackgroundDrawing();
|
||||
bool useOptimisedViewPreallocationOnAndroid();
|
||||
bool useOptimizedEventBatchingOnAndroid();
|
||||
bool useRuntimeShadowNodeReferenceUpdate();
|
||||
@@ -93,7 +91,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
||||
bool wasOverridden_;
|
||||
|
||||
std::array<std::atomic<const char*>, 52> accessedFeatureFlags_;
|
||||
std::array<std::atomic<const char*>, 50> accessedFeatureFlags_;
|
||||
|
||||
std::atomic<std::optional<bool>> commonTestFlag_;
|
||||
std::atomic<std::optional<bool>> allowRecursiveCommitsWithSynchronousMountOnAndroid_;
|
||||
@@ -102,7 +100,6 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::atomic<std::optional<bool>> destroyFabricSurfacesInReactInstanceManager_;
|
||||
std::atomic<std::optional<bool>> enableAlignItemsBaselineOnFabricIOS_;
|
||||
std::atomic<std::optional<bool>> enableAndroidLineHeightCentering_;
|
||||
std::atomic<std::optional<bool>> enableBackgroundStyleApplicator_;
|
||||
std::atomic<std::optional<bool>> enableBridgelessArchitecture_;
|
||||
std::atomic<std::optional<bool>> enableCleanTextInputYogaNode_;
|
||||
std::atomic<std::optional<bool>> enableDeletionOfUnmountedViews_;
|
||||
@@ -140,7 +137,6 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::atomic<std::optional<bool>> useImmediateExecutorInAndroidBridgeless_;
|
||||
std::atomic<std::optional<bool>> useModernRuntimeScheduler_;
|
||||
std::atomic<std::optional<bool>> useNativeViewConfigsInBridgelessMode_;
|
||||
std::atomic<std::optional<bool>> useNewReactImageViewBackgroundDrawing_;
|
||||
std::atomic<std::optional<bool>> useOptimisedViewPreallocationOnAndroid_;
|
||||
std::atomic<std::optional<bool>> useOptimizedEventBatchingOnAndroid_;
|
||||
std::atomic<std::optional<bool>> useRuntimeShadowNodeReferenceUpdate_;
|
||||
|
||||
+1
-9
@@ -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<<001d0b39664b190385442ca8661a08a8>>
|
||||
* @generated SignedSource<<e8b849d614b943b044df611371c0d891>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -55,10 +55,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool enableBackgroundStyleApplicator() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool enableBridgelessArchitecture() override {
|
||||
return false;
|
||||
}
|
||||
@@ -207,10 +203,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool useNewReactImageViewBackgroundDrawing() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool useOptimisedViewPreallocationOnAndroid() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
+1
-3
@@ -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<<ddd6b6977c8ee0e40d710947b4a23c3c>>
|
||||
* @generated SignedSource<<317288fd521f74c3542457b991373662>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -32,7 +32,6 @@ class ReactNativeFeatureFlagsProvider {
|
||||
virtual bool destroyFabricSurfacesInReactInstanceManager() = 0;
|
||||
virtual bool enableAlignItemsBaselineOnFabricIOS() = 0;
|
||||
virtual bool enableAndroidLineHeightCentering() = 0;
|
||||
virtual bool enableBackgroundStyleApplicator() = 0;
|
||||
virtual bool enableBridgelessArchitecture() = 0;
|
||||
virtual bool enableCleanTextInputYogaNode() = 0;
|
||||
virtual bool enableDeletionOfUnmountedViews() = 0;
|
||||
@@ -70,7 +69,6 @@ class ReactNativeFeatureFlagsProvider {
|
||||
virtual bool useImmediateExecutorInAndroidBridgeless() = 0;
|
||||
virtual bool useModernRuntimeScheduler() = 0;
|
||||
virtual bool useNativeViewConfigsInBridgelessMode() = 0;
|
||||
virtual bool useNewReactImageViewBackgroundDrawing() = 0;
|
||||
virtual bool useOptimisedViewPreallocationOnAndroid() = 0;
|
||||
virtual bool useOptimizedEventBatchingOnAndroid() = 0;
|
||||
virtual bool useRuntimeShadowNodeReferenceUpdate() = 0;
|
||||
|
||||
+1
-11
@@ -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<<74bbe88f1a61cca088a504bb2a1bc19c>>
|
||||
* @generated SignedSource<<fc700d1754817be6312f6abdca4238f4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -72,11 +72,6 @@ bool NativeReactNativeFeatureFlags::enableAndroidLineHeightCentering(
|
||||
return ReactNativeFeatureFlags::enableAndroidLineHeightCentering();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::enableBackgroundStyleApplicator(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::enableBackgroundStyleApplicator();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::enableBridgelessArchitecture(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::enableBridgelessArchitecture();
|
||||
@@ -262,11 +257,6 @@ bool NativeReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode(
|
||||
return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::useNewReactImageViewBackgroundDrawing(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::useNewReactImageViewBackgroundDrawing();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::useOptimisedViewPreallocationOnAndroid(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::useOptimisedViewPreallocationOnAndroid();
|
||||
|
||||
+1
-5
@@ -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<<447e801fe9b49d2413d8bfbc106019a0>>
|
||||
* @generated SignedSource<<9a548d27906a420f179124f97197c25f>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -49,8 +49,6 @@ class NativeReactNativeFeatureFlags
|
||||
|
||||
bool enableAndroidLineHeightCentering(jsi::Runtime& runtime);
|
||||
|
||||
bool enableBackgroundStyleApplicator(jsi::Runtime& runtime);
|
||||
|
||||
bool enableBridgelessArchitecture(jsi::Runtime& runtime);
|
||||
|
||||
bool enableCleanTextInputYogaNode(jsi::Runtime& runtime);
|
||||
@@ -125,8 +123,6 @@ class NativeReactNativeFeatureFlags
|
||||
|
||||
bool useNativeViewConfigsInBridgelessMode(jsi::Runtime& runtime);
|
||||
|
||||
bool useNewReactImageViewBackgroundDrawing(jsi::Runtime& runtime);
|
||||
|
||||
bool useOptimisedViewPreallocationOnAndroid(jsi::Runtime& runtime);
|
||||
|
||||
bool useOptimizedEventBatchingOnAndroid(jsi::Runtime& runtime);
|
||||
|
||||
@@ -98,15 +98,6 @@ const definitions: FeatureFlagDefinitions = {
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
},
|
||||
enableBackgroundStyleApplicator: {
|
||||
defaultValue: true,
|
||||
metadata: {
|
||||
dateAdded: '2024-07-29',
|
||||
description:
|
||||
'Use BackgroundStyleApplicator in place of other background/border drawing code',
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
},
|
||||
enableBridgelessArchitecture: {
|
||||
defaultValue: false,
|
||||
metadata: {
|
||||
@@ -422,15 +413,6 @@ const definitions: FeatureFlagDefinitions = {
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
},
|
||||
useNewReactImageViewBackgroundDrawing: {
|
||||
defaultValue: false,
|
||||
metadata: {
|
||||
dateAdded: '2024-07-11',
|
||||
description:
|
||||
'Use shared background drawing code for ReactImageView instead of using Fresco to manipulate the bitmap',
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
},
|
||||
useOptimisedViewPreallocationOnAndroid: {
|
||||
defaultValue: false,
|
||||
metadata: {
|
||||
|
||||
@@ -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<<e161b67cb919ad7e2e67ddcb3c501adb>>
|
||||
* @generated SignedSource<<eae8bf8e1f529a034a65377353cda539>>
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
@@ -56,7 +56,6 @@ export type ReactNativeFeatureFlags = {
|
||||
destroyFabricSurfacesInReactInstanceManager: Getter<boolean>,
|
||||
enableAlignItemsBaselineOnFabricIOS: Getter<boolean>,
|
||||
enableAndroidLineHeightCentering: Getter<boolean>,
|
||||
enableBackgroundStyleApplicator: Getter<boolean>,
|
||||
enableBridgelessArchitecture: Getter<boolean>,
|
||||
enableCleanTextInputYogaNode: Getter<boolean>,
|
||||
enableDeletionOfUnmountedViews: Getter<boolean>,
|
||||
@@ -94,7 +93,6 @@ export type ReactNativeFeatureFlags = {
|
||||
useImmediateExecutorInAndroidBridgeless: Getter<boolean>,
|
||||
useModernRuntimeScheduler: Getter<boolean>,
|
||||
useNativeViewConfigsInBridgelessMode: Getter<boolean>,
|
||||
useNewReactImageViewBackgroundDrawing: Getter<boolean>,
|
||||
useOptimisedViewPreallocationOnAndroid: Getter<boolean>,
|
||||
useOptimizedEventBatchingOnAndroid: Getter<boolean>,
|
||||
useRuntimeShadowNodeReferenceUpdate: Getter<boolean>,
|
||||
@@ -211,10 +209,6 @@ export const enableAlignItemsBaselineOnFabricIOS: Getter<boolean> = createNative
|
||||
* When enabled, custom line height calculation will be centered from top to bottom.
|
||||
*/
|
||||
export const enableAndroidLineHeightCentering: Getter<boolean> = createNativeFlagGetter('enableAndroidLineHeightCentering', false);
|
||||
/**
|
||||
* Use BackgroundStyleApplicator in place of other background/border drawing code
|
||||
*/
|
||||
export const enableBackgroundStyleApplicator: Getter<boolean> = createNativeFlagGetter('enableBackgroundStyleApplicator', true);
|
||||
/**
|
||||
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer.
|
||||
*/
|
||||
@@ -363,10 +357,6 @@ export const useModernRuntimeScheduler: Getter<boolean> = createNativeFlagGetter
|
||||
* When enabled, the native view configs are used in bridgeless mode.
|
||||
*/
|
||||
export const useNativeViewConfigsInBridgelessMode: Getter<boolean> = createNativeFlagGetter('useNativeViewConfigsInBridgelessMode', false);
|
||||
/**
|
||||
* Use shared background drawing code for ReactImageView instead of using Fresco to manipulate the bitmap
|
||||
*/
|
||||
export const useNewReactImageViewBackgroundDrawing: Getter<boolean> = createNativeFlagGetter('useNewReactImageViewBackgroundDrawing', false);
|
||||
/**
|
||||
* Moves more of the work in view preallocation to the main thread to free up JS thread.
|
||||
*/
|
||||
|
||||
+1
-3
@@ -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<<cd4a2a047e3a6fdb4205efb518906462>>
|
||||
* @generated SignedSource<<e06d779a11dda87c5997c43bcb900ac2>>
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,6 @@ export interface Spec extends TurboModule {
|
||||
+destroyFabricSurfacesInReactInstanceManager?: () => boolean;
|
||||
+enableAlignItemsBaselineOnFabricIOS?: () => boolean;
|
||||
+enableAndroidLineHeightCentering?: () => boolean;
|
||||
+enableBackgroundStyleApplicator?: () => boolean;
|
||||
+enableBridgelessArchitecture?: () => boolean;
|
||||
+enableCleanTextInputYogaNode?: () => boolean;
|
||||
+enableDeletionOfUnmountedViews?: () => boolean;
|
||||
@@ -68,7 +67,6 @@ export interface Spec extends TurboModule {
|
||||
+useImmediateExecutorInAndroidBridgeless?: () => boolean;
|
||||
+useModernRuntimeScheduler?: () => boolean;
|
||||
+useNativeViewConfigsInBridgelessMode?: () => boolean;
|
||||
+useNewReactImageViewBackgroundDrawing?: () => boolean;
|
||||
+useOptimisedViewPreallocationOnAndroid?: () => boolean;
|
||||
+useOptimizedEventBatchingOnAndroid?: () => boolean;
|
||||
+useRuntimeShadowNodeReferenceUpdate?: () => boolean;
|
||||
|
||||
Reference in New Issue
Block a user