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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<a89ede36c4631b7a7709899858a7f9c9>>
* @generated SignedSource<<4004d8650ddb3d1bc9afb9c5c72fa191>>
*/

/**
Expand Down Expand Up @@ -144,6 +144,12 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun enableBridgelessArchitecture(): Boolean = accessor.enableBridgelessArchitecture()

/**
* When enabled, Android receives prop updates based on props diffing only for core components with hand-written props (View, Text, Image, ScrollView, TextInput). Other components keep receiving raw props unless `enablePropsUpdateReconciliationAndroid` is enabled.
*/
@JvmStatic
public fun enableCoreComponentsPropsUpdateReconciliationAndroid(): Boolean = accessor.enableCoreComponentsPropsUpdateReconciliationAndroid()

/**
* Enable prop iterator setter-style construction of Props in C++ (this flag is not used in Java).
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<cd3b4f6a7fb4e616d3f56ab8c9eb9658>>
* @generated SignedSource<<ce00ac89f11fb69c485807206c67e11d>>
*/

/**
Expand Down Expand Up @@ -39,6 +39,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var enableAndroidTextMeasurementOptimizationsCache: Boolean? = null
private var enableAsyncDiskCacheCheckInMultiSourceImageAndroidCache: Boolean? = null
private var enableBridgelessArchitectureCache: Boolean? = null
private var enableCoreComponentsPropsUpdateReconciliationAndroidCache: Boolean? = null
private var enableCppPropsIteratorSetterCache: Boolean? = null
private var enableCustomFocusSearchOnClippedElementsAndroidCache: Boolean? = null
private var enableDestroyShadowTreeRevisionAsyncCache: Boolean? = null
Expand Down Expand Up @@ -289,6 +290,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun enableCppPropsIteratorSetter(): Boolean {
var cached = enableCppPropsIteratorSetterCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<6d86d4adbc261c9271b5bed72bd12dcf>>
* @generated SignedSource<<8e143d9668e06e97c1a4e04542e35295>>
*/

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

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

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

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

@DoNotStrip @JvmStatic public external fun enableCustomFocusSearchOnClippedElementsAndroid(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<a1368426dd823245c54b4312ae7b14e6>>
* @generated SignedSource<<328892d289851df4d865c737199e8ee0>>
*/

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

override fun enableBridgelessArchitecture(): Boolean = true

override fun enableCoreComponentsPropsUpdateReconciliationAndroid(): Boolean = false

override fun enableCppPropsIteratorSetter(): Boolean = false

override fun enableCustomFocusSearchOnClippedElementsAndroid(): Boolean = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<c305274be2fc6720b6c0eb75e78bd6b0>>
* @generated SignedSource<<19c3e5eaeb8f71fff3433783360a2a5f>>
*/

/**
Expand Down Expand Up @@ -43,6 +43,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var enableAndroidTextMeasurementOptimizationsCache: Boolean? = null
private var enableAsyncDiskCacheCheckInMultiSourceImageAndroidCache: Boolean? = null
private var enableBridgelessArchitectureCache: Boolean? = null
private var enableCoreComponentsPropsUpdateReconciliationAndroidCache: Boolean? = null
private var enableCppPropsIteratorSetterCache: Boolean? = null
private var enableCustomFocusSearchOnClippedElementsAndroidCache: Boolean? = null
private var enableDestroyShadowTreeRevisionAsyncCache: Boolean? = null
Expand Down Expand Up @@ -312,6 +313,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

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

override fun enableCppPropsIteratorSetter(): Boolean {
var cached = enableCppPropsIteratorSetterCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<c5daa3cf1c88507ccb625ba7367dfcaf>>
* @generated SignedSource<<dd4b709a0ae7dd4f6f144208945beda8>>
*/

/**
Expand All @@ -27,6 +27,8 @@ public open class ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android :

override fun disableIdleMountItemFrameCallbackRearmAndroid(): Boolean = true

override fun enableCoreComponentsPropsUpdateReconciliationAndroid(): Boolean = true

override fun enableFlexboxAutoMinSizeInStrictMode(): Boolean = true

override fun preventShadowTreeCommitExhaustion(): Boolean = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<da45e41e9a58711ee3b68a38965938fb>>
* @generated SignedSource<<12a19d59f2a9d8242a0ae3d3d4b1d825>>
*/

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

@DoNotStrip public fun enableBridgelessArchitecture(): Boolean

@DoNotStrip public fun enableCoreComponentsPropsUpdateReconciliationAndroid(): Boolean

@DoNotStrip public fun enableCppPropsIteratorSetter(): Boolean

@DoNotStrip public fun enableCustomFocusSearchOnClippedElementsAndroid(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,15 +329,11 @@ jni::local_ref<jobject> getProps(
const ShadowView& oldShadowView,
const ShadowView& newShadowView) {
// We calculate the diffing between the props of the last mounted ShadowTree
// and the Props of the latest commited ShadowTree). ONLY for <View>
// components when the "enablePropsUpdateReconciliationAndroid" feature flag
// is enabled.
// and the Props of the latest commited ShadowTree), for components selected
// by `isPropsDiffingEnabled`.
auto* oldProps = oldShadowView.props.get();
auto* newProps = newShadowView.props.get();
if ((ReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid()) &&
strcmp(
newShadowView.componentName,
newProps->getDiffPropsImplementationTarget()) == 0) {
if (isPropsDiffingEnabled(newShadowView.componentName, *newProps)) {
auto diff = newProps->getDiffProps(oldProps);

#ifdef REACT_NATIVE_DEBUG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<944781e7a547e601f0637869a3a3ec5e>>
* @generated SignedSource<<fc4fcacc2a1b5641ec630d4659935052>>
*/

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

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

bool enableCppPropsIteratorSetter() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableCppPropsIteratorSetter");
Expand Down Expand Up @@ -720,6 +726,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enableBridgelessArchitecture(
return ReactNativeFeatureFlags::enableBridgelessArchitecture();
}

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

bool JReactNativeFeatureFlagsCxxInterop::enableCppPropsIteratorSetter(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableCppPropsIteratorSetter();
Expand Down Expand Up @@ -1198,6 +1209,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableBridgelessArchitecture",
JReactNativeFeatureFlagsCxxInterop::enableBridgelessArchitecture),
makeNativeMethod(
"enableCoreComponentsPropsUpdateReconciliationAndroid",
JReactNativeFeatureFlagsCxxInterop::enableCoreComponentsPropsUpdateReconciliationAndroid),
makeNativeMethod(
"enableCppPropsIteratorSetter",
JReactNativeFeatureFlagsCxxInterop::enableCppPropsIteratorSetter),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<ad9275a6afb74520bec7d446faafd1bc>>
* @generated SignedSource<<23f91198ea1e19abb3eb7004de696505>>
*/

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

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<56e127471f63e47798ec619e6fa56738>>
* @generated SignedSource<<764aeebfb1e2fc17dae032247e5e69cf>>
*/

/**
Expand Down Expand Up @@ -102,6 +102,10 @@ bool ReactNativeFeatureFlags::enableBridgelessArchitecture() {
return getAccessor().enableBridgelessArchitecture();
}

bool ReactNativeFeatureFlags::enableCoreComponentsPropsUpdateReconciliationAndroid() {
return getAccessor().enableCoreComponentsPropsUpdateReconciliationAndroid();
}

bool ReactNativeFeatureFlags::enableCppPropsIteratorSetter() {
return getAccessor().enableCppPropsIteratorSetter();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<6887b671526bc8a3b0678e3e45b4e3b4>>
* @generated SignedSource<<8fc79697c78a91d401a1aec0b5e44d1b>>
*/

/**
Expand Down Expand Up @@ -136,6 +136,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool enableBridgelessArchitecture();

/**
* When enabled, Android receives prop updates based on props diffing only for core components with hand-written props (View, Text, Image, ScrollView, TextInput). Other components keep receiving raw props unless `enablePropsUpdateReconciliationAndroid` is enabled.
*/
RN_EXPORT static bool enableCoreComponentsPropsUpdateReconciliationAndroid();

/**
* Enable prop iterator setter-style construction of Props in C++ (this flag is not used in Java).
*/
Expand Down
Loading
Loading