mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
ship useOptimisedViewPreallocationOnAndroid everywhere and remove gating (#48903)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48903 changelog: [internal] Reviewed By: rubennorte Differential Revision: D68490542 fbshipit-source-id: f743e9c82328c5f06b431cffe77f9a28608535b9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
46e86dca87
commit
0f0344984f
+1
-1
@@ -1374,7 +1374,7 @@ public class FabricUIManager
|
||||
mBinding.driveCxxAnimations();
|
||||
}
|
||||
|
||||
if (ReactNativeFeatureFlags.useOptimisedViewPreallocationOnAndroid() && mBinding != null) {
|
||||
if (mBinding != null) {
|
||||
mBinding.drainPreallocateViewsQueue();
|
||||
}
|
||||
|
||||
|
||||
+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<<841c26f98395a48dad2ff748dd009f07>>
|
||||
* @generated SignedSource<<69be45d967e3883a960c49d760fc2ca1>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -244,12 +244,6 @@ public object ReactNativeFeatureFlags {
|
||||
@JvmStatic
|
||||
public fun useNativeViewConfigsInBridgelessMode(): Boolean = accessor.useNativeViewConfigsInBridgelessMode()
|
||||
|
||||
/**
|
||||
* Moves more of the work in view preallocation to the main thread to free up JS thread.
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun useOptimisedViewPreallocationOnAndroid(): Boolean = accessor.useOptimisedViewPreallocationOnAndroid()
|
||||
|
||||
/**
|
||||
* Uses an optimized mechanism for event batching on Android that does not need to wait for a Choreographer frame callback.
|
||||
*/
|
||||
|
||||
+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<<735455b25aae2fa07a5e36e478b78f0f>>
|
||||
* @generated SignedSource<<e6816ffbe4d790d219c6aced5b3c695c>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -56,7 +56,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
|
||||
private var useFabricInteropCache: Boolean? = null
|
||||
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
|
||||
private var useOptimisedViewPreallocationOnAndroidCache: Boolean? = null
|
||||
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
|
||||
private var useRawPropsJsiValueCache: Boolean? = null
|
||||
private var useRuntimeShadowNodeReferenceUpdateCache: Boolean? = null
|
||||
@@ -387,15 +386,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useOptimisedViewPreallocationOnAndroid(): Boolean {
|
||||
var cached = useOptimisedViewPreallocationOnAndroidCache
|
||||
if (cached == null) {
|
||||
cached = ReactNativeFeatureFlagsCxxInterop.useOptimisedViewPreallocationOnAndroid()
|
||||
useOptimisedViewPreallocationOnAndroidCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useOptimizedEventBatchingOnAndroid(): Boolean {
|
||||
var cached = useOptimizedEventBatchingOnAndroidCache
|
||||
if (cached == null) {
|
||||
|
||||
+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<<6390e3da6c736f01254531394b566e39>>
|
||||
* @generated SignedSource<<fa884f44a3f1e00a3853393bb3e8dff7>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -100,8 +100,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useNativeViewConfigsInBridgelessMode(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useOptimisedViewPreallocationOnAndroid(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useOptimizedEventBatchingOnAndroid(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useRawPropsJsiValue(): Boolean
|
||||
|
||||
+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<<588a6c3434cdf6ccb470cd8bb914fae0>>
|
||||
* @generated SignedSource<<71ea4cd62cc16ed718fdc764ec97d0e8>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -95,8 +95,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun useNativeViewConfigsInBridgelessMode(): Boolean = false
|
||||
|
||||
override fun useOptimisedViewPreallocationOnAndroid(): Boolean = false
|
||||
|
||||
override fun useOptimizedEventBatchingOnAndroid(): Boolean = false
|
||||
|
||||
override fun useRawPropsJsiValue(): Boolean = false
|
||||
|
||||
+1
-12
@@ -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<<5d69e428af96cdbb839db2d22920c7fc>>
|
||||
* @generated SignedSource<<2896efd81aed8e0100d61e739cb2ba04>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -60,7 +60,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
|
||||
private var useFabricInteropCache: Boolean? = null
|
||||
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
|
||||
private var useOptimisedViewPreallocationOnAndroidCache: Boolean? = null
|
||||
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
|
||||
private var useRawPropsJsiValueCache: Boolean? = null
|
||||
private var useRuntimeShadowNodeReferenceUpdateCache: Boolean? = null
|
||||
@@ -427,16 +426,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useOptimisedViewPreallocationOnAndroid(): Boolean {
|
||||
var cached = useOptimisedViewPreallocationOnAndroidCache
|
||||
if (cached == null) {
|
||||
cached = currentProvider.useOptimisedViewPreallocationOnAndroid()
|
||||
accessedFeatureFlags.add("useOptimisedViewPreallocationOnAndroid")
|
||||
useOptimisedViewPreallocationOnAndroidCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useOptimizedEventBatchingOnAndroid(): Boolean {
|
||||
var cached = useOptimizedEventBatchingOnAndroidCache
|
||||
if (cached == null) {
|
||||
|
||||
+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<<6ec0906be44bb10e8b87bce7d70fdce2>>
|
||||
* @generated SignedSource<<8f051d9cd1918cdf584de4d469f40ae9>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -95,8 +95,6 @@ public interface ReactNativeFeatureFlagsProvider {
|
||||
|
||||
@DoNotStrip public fun useNativeViewConfigsInBridgelessMode(): Boolean
|
||||
|
||||
@DoNotStrip public fun useOptimisedViewPreallocationOnAndroid(): Boolean
|
||||
|
||||
@DoNotStrip public fun useOptimizedEventBatchingOnAndroid(): Boolean
|
||||
|
||||
@DoNotStrip public fun useRawPropsJsiValue(): Boolean
|
||||
|
||||
+1
-7
@@ -925,15 +925,9 @@ void FabricMountingManager::maybePreallocateShadowNode(
|
||||
|
||||
auto shadowView = ShadowView(shadowNode);
|
||||
|
||||
if (ReactNativeFeatureFlags::useOptimisedViewPreallocationOnAndroid()) {
|
||||
// Optimised implementation where FabricUIManager.preallocateView is called
|
||||
// from the main thread.
|
||||
{
|
||||
std::lock_guard lock(preallocateMutex_);
|
||||
preallocatedViewsQueue_.push_back(std::move(shadowView));
|
||||
} else {
|
||||
// Old implementation where FabricUIManager.preallocateView is called
|
||||
// immediately.
|
||||
preallocateShadowView(shadowView);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-15
@@ -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<<0252081684dcdb8295018b34980fcac2>>
|
||||
* @generated SignedSource<<f09ad92744f524ede76f699f3188288f>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -255,12 +255,6 @@ class ReactNativeFeatureFlagsProviderHolder
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool useOptimisedViewPreallocationOnAndroid() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useOptimisedViewPreallocationOnAndroid");
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool useOptimizedEventBatchingOnAndroid() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useOptimizedEventBatchingOnAndroid");
|
||||
@@ -475,11 +469,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode(
|
||||
return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::useOptimisedViewPreallocationOnAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::useOptimisedViewPreallocationOnAndroid();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::useOptimizedEventBatchingOnAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::useOptimizedEventBatchingOnAndroid();
|
||||
@@ -644,9 +633,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"useNativeViewConfigsInBridgelessMode",
|
||||
JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode),
|
||||
makeNativeMethod(
|
||||
"useOptimisedViewPreallocationOnAndroid",
|
||||
JReactNativeFeatureFlagsCxxInterop::useOptimisedViewPreallocationOnAndroid),
|
||||
makeNativeMethod(
|
||||
"useOptimizedEventBatchingOnAndroid",
|
||||
JReactNativeFeatureFlagsCxxInterop::useOptimizedEventBatchingOnAndroid),
|
||||
|
||||
+1
-4
@@ -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<<c751e39a2a924bf55d5529a4e86ad99b>>
|
||||
* @generated SignedSource<<94c5db58f8b59d4ccc16e4983d3c6f2e>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -138,9 +138,6 @@ class JReactNativeFeatureFlagsCxxInterop
|
||||
static bool useNativeViewConfigsInBridgelessMode(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool useOptimisedViewPreallocationOnAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool useOptimizedEventBatchingOnAndroid(
|
||||
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<<097c771aa1ff769709f7d08a75da50b6>>
|
||||
* @generated SignedSource<<1eb35511f4c5fd393c234c026709eb11>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -170,10 +170,6 @@ bool ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode() {
|
||||
return getAccessor().useNativeViewConfigsInBridgelessMode();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::useOptimisedViewPreallocationOnAndroid() {
|
||||
return getAccessor().useOptimisedViewPreallocationOnAndroid();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::useOptimizedEventBatchingOnAndroid() {
|
||||
return getAccessor().useOptimizedEventBatchingOnAndroid();
|
||||
}
|
||||
|
||||
@@ -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<<25afc05f79ba873b70a39019ca245c39>>
|
||||
* @generated SignedSource<<88118789d97156c16a7ab691ca181d00>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -219,11 +219,6 @@ class ReactNativeFeatureFlags {
|
||||
*/
|
||||
RN_EXPORT static bool useNativeViewConfigsInBridgelessMode();
|
||||
|
||||
/**
|
||||
* Moves more of the work in view preallocation to the main thread to free up JS thread.
|
||||
*/
|
||||
RN_EXPORT static bool useOptimisedViewPreallocationOnAndroid();
|
||||
|
||||
/**
|
||||
* Uses an optimized mechanism for event batching on Android that does not need to wait for a Choreographer frame callback.
|
||||
*/
|
||||
|
||||
+6
-24
@@ -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<<a6053011a74345b21a800e88ab928816>>
|
||||
* @generated SignedSource<<fc67fb2f9f1634fe4a477292f5098ab4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -677,24 +677,6 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::useOptimisedViewPreallocationOnAndroid() {
|
||||
auto flagValue = useOptimisedViewPreallocationOnAndroid_.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(36, "useOptimisedViewPreallocationOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useOptimisedViewPreallocationOnAndroid();
|
||||
useOptimisedViewPreallocationOnAndroid_ = flagValue;
|
||||
}
|
||||
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
|
||||
auto flagValue = useOptimizedEventBatchingOnAndroid_.load();
|
||||
|
||||
@@ -704,7 +686,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(37, "useOptimizedEventBatchingOnAndroid");
|
||||
markFlagAsAccessed(36, "useOptimizedEventBatchingOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
|
||||
useOptimizedEventBatchingOnAndroid_ = flagValue;
|
||||
@@ -722,7 +704,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(38, "useRawPropsJsiValue");
|
||||
markFlagAsAccessed(37, "useRawPropsJsiValue");
|
||||
|
||||
flagValue = currentProvider_->useRawPropsJsiValue();
|
||||
useRawPropsJsiValue_ = flagValue;
|
||||
@@ -740,7 +722,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(39, "useRuntimeShadowNodeReferenceUpdate");
|
||||
markFlagAsAccessed(38, "useRuntimeShadowNodeReferenceUpdate");
|
||||
|
||||
flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdate();
|
||||
useRuntimeShadowNodeReferenceUpdate_ = flagValue;
|
||||
@@ -758,7 +740,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(40, "useTurboModuleInterop");
|
||||
markFlagAsAccessed(39, "useTurboModuleInterop");
|
||||
|
||||
flagValue = currentProvider_->useTurboModuleInterop();
|
||||
useTurboModuleInterop_ = flagValue;
|
||||
@@ -776,7 +758,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(41, "useTurboModules");
|
||||
markFlagAsAccessed(40, "useTurboModules");
|
||||
|
||||
flagValue = currentProvider_->useTurboModules();
|
||||
useTurboModules_ = flagValue;
|
||||
|
||||
+2
-4
@@ -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<<beae68d0e22b526be999edf3e2e6d39c>>
|
||||
* @generated SignedSource<<29ce7fa71b300ff721db97d622c29e6a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -68,7 +68,6 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
bool useEditTextStockAndroidFocusBehavior();
|
||||
bool useFabricInterop();
|
||||
bool useNativeViewConfigsInBridgelessMode();
|
||||
bool useOptimisedViewPreallocationOnAndroid();
|
||||
bool useOptimizedEventBatchingOnAndroid();
|
||||
bool useRawPropsJsiValue();
|
||||
bool useRuntimeShadowNodeReferenceUpdate();
|
||||
@@ -85,7 +84,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
||||
bool wasOverridden_;
|
||||
|
||||
std::array<std::atomic<const char*>, 42> accessedFeatureFlags_;
|
||||
std::array<std::atomic<const char*>, 41> accessedFeatureFlags_;
|
||||
|
||||
std::atomic<std::optional<bool>> commonTestFlag_;
|
||||
std::atomic<std::optional<bool>> disableMountItemReorderingAndroid_;
|
||||
@@ -123,7 +122,6 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::atomic<std::optional<bool>> useEditTextStockAndroidFocusBehavior_;
|
||||
std::atomic<std::optional<bool>> useFabricInterop_;
|
||||
std::atomic<std::optional<bool>> useNativeViewConfigsInBridgelessMode_;
|
||||
std::atomic<std::optional<bool>> useOptimisedViewPreallocationOnAndroid_;
|
||||
std::atomic<std::optional<bool>> useOptimizedEventBatchingOnAndroid_;
|
||||
std::atomic<std::optional<bool>> useRawPropsJsiValue_;
|
||||
std::atomic<std::optional<bool>> useRuntimeShadowNodeReferenceUpdate_;
|
||||
|
||||
+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<<3bf74cbd626df283429e270fe45ff5b4>>
|
||||
* @generated SignedSource<<3a526f2dc57cf7ace4597660e4b809c4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -171,10 +171,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool useOptimisedViewPreallocationOnAndroid() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool useOptimizedEventBatchingOnAndroid() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
+1
-10
@@ -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<<94797dc944ce9355aeffc4b1c5825708>>
|
||||
* @generated SignedSource<<c714697c946be59c84fa2bb68cc91644>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -369,15 +369,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
||||
return ReactNativeFeatureFlagsDefaults::useNativeViewConfigsInBridgelessMode();
|
||||
}
|
||||
|
||||
bool useOptimisedViewPreallocationOnAndroid() override {
|
||||
auto value = values_["useOptimisedViewPreallocationOnAndroid"];
|
||||
if (!value.isNull()) {
|
||||
return value.getBool();
|
||||
}
|
||||
|
||||
return ReactNativeFeatureFlagsDefaults::useOptimisedViewPreallocationOnAndroid();
|
||||
}
|
||||
|
||||
bool useOptimizedEventBatchingOnAndroid() override {
|
||||
auto value = values_["useOptimizedEventBatchingOnAndroid"];
|
||||
if (!value.isNull()) {
|
||||
|
||||
+1
-2
@@ -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<<1b5ec1748790308cce8f5cdf7f3726d5>>
|
||||
* @generated SignedSource<<89e9d4db655464901795f56f93583be8>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -61,7 +61,6 @@ class ReactNativeFeatureFlagsProvider {
|
||||
virtual bool useEditTextStockAndroidFocusBehavior() = 0;
|
||||
virtual bool useFabricInterop() = 0;
|
||||
virtual bool useNativeViewConfigsInBridgelessMode() = 0;
|
||||
virtual bool useOptimisedViewPreallocationOnAndroid() = 0;
|
||||
virtual bool useOptimizedEventBatchingOnAndroid() = 0;
|
||||
virtual bool useRawPropsJsiValue() = 0;
|
||||
virtual bool useRuntimeShadowNodeReferenceUpdate() = 0;
|
||||
|
||||
+1
-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<<fdf7adf85d57448b5c86154ec035b8c8>>
|
||||
* @generated SignedSource<<6b314d87b09e65d8c70a0d3f4caf953a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -231,11 +231,6 @@ bool NativeReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode(
|
||||
return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::useOptimisedViewPreallocationOnAndroid(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::useOptimisedViewPreallocationOnAndroid();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::useOptimizedEventBatchingOnAndroid(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::useOptimizedEventBatchingOnAndroid();
|
||||
|
||||
+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<<c849c4183e05d0eeac58e5529f321e20>>
|
||||
* @generated SignedSource<<3b3ce0cfc8578f517393b89dc76a9aac>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -111,8 +111,6 @@ class NativeReactNativeFeatureFlags
|
||||
|
||||
bool useNativeViewConfigsInBridgelessMode(jsi::Runtime& runtime);
|
||||
|
||||
bool useOptimisedViewPreallocationOnAndroid(jsi::Runtime& runtime);
|
||||
|
||||
bool useOptimizedEventBatchingOnAndroid(jsi::Runtime& runtime);
|
||||
|
||||
bool useRawPropsJsiValue(jsi::Runtime& runtime);
|
||||
|
||||
@@ -399,16 +399,6 @@ const definitions: FeatureFlagDefinitions = {
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
},
|
||||
useOptimisedViewPreallocationOnAndroid: {
|
||||
defaultValue: false,
|
||||
metadata: {
|
||||
dateAdded: '2024-07-23',
|
||||
description:
|
||||
'Moves more of the work in view preallocation to the main thread to free up JS thread.',
|
||||
expectedReleaseValue: true,
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
},
|
||||
useOptimizedEventBatchingOnAndroid: {
|
||||
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<<7a6083ca926d6cdef5a840b1feff4913>>
|
||||
* @generated SignedSource<<b8f67626bff7429da51601f0c9eefd49>>
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
@@ -84,7 +84,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
||||
useEditTextStockAndroidFocusBehavior: Getter<boolean>,
|
||||
useFabricInterop: Getter<boolean>,
|
||||
useNativeViewConfigsInBridgelessMode: Getter<boolean>,
|
||||
useOptimisedViewPreallocationOnAndroid: Getter<boolean>,
|
||||
useOptimizedEventBatchingOnAndroid: Getter<boolean>,
|
||||
useRawPropsJsiValue: Getter<boolean>,
|
||||
useRuntimeShadowNodeReferenceUpdate: Getter<boolean>,
|
||||
@@ -309,10 +308,6 @@ export const useFabricInterop: Getter<boolean> = createNativeFlagGetter('useFabr
|
||||
* When enabled, the native view configs are used in bridgeless mode.
|
||||
*/
|
||||
export const useNativeViewConfigsInBridgelessMode: Getter<boolean> = createNativeFlagGetter('useNativeViewConfigsInBridgelessMode', false);
|
||||
/**
|
||||
* Moves more of the work in view preallocation to the main thread to free up JS thread.
|
||||
*/
|
||||
export const useOptimisedViewPreallocationOnAndroid: Getter<boolean> = createNativeFlagGetter('useOptimisedViewPreallocationOnAndroid', false);
|
||||
/**
|
||||
* Uses an optimized mechanism for event batching on Android that does not need to wait for a Choreographer frame callback.
|
||||
*/
|
||||
|
||||
+1
-2
@@ -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<<506909b1ceaa8b29b0649014d1f24894>>
|
||||
* @generated SignedSource<<c23785c59894d331228bece04fe3a868>>
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
@@ -61,7 +61,6 @@ export interface Spec extends TurboModule {
|
||||
+useEditTextStockAndroidFocusBehavior?: () => boolean;
|
||||
+useFabricInterop?: () => boolean;
|
||||
+useNativeViewConfigsInBridgelessMode?: () => boolean;
|
||||
+useOptimisedViewPreallocationOnAndroid?: () => boolean;
|
||||
+useOptimizedEventBatchingOnAndroid?: () => boolean;
|
||||
+useRawPropsJsiValue?: () => boolean;
|
||||
+useRuntimeShadowNodeReferenceUpdate?: () => boolean;
|
||||
|
||||
Reference in New Issue
Block a user