Skip to content
Draft
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
2 changes: 1 addition & 1 deletion packages/react-native/ReactAndroid/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=0.86.0-discord-31
VERSION_NAME=0.86.0-kosmydel-yoga-setsize
react.internal.publishingGroup=com.facebook.react
react.internal.hermesPublishingGroup=com.facebook.hermes

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<<652b195c21ffe47263fcfbe77a898aa1>>
* @generated SignedSource<<8004c71ad564ff4bfb2766ad3665c2e5>>
*/

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

/**
* Skip dirtying Yoga nodes in setSize/setPositionType when the value is unchanged (react-native#59101).
*/
@JvmStatic
public fun discordSkipUnchangedYogaDirty(): Boolean = accessor.discordSkipUnchangedYogaDirty()

/**
* Select UIManager optimizations: 0 = none, 1 = preserve lazy properties, 2 = load view manager constants on demand.
*/
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<<10c483c7007076bb3c1cee1197c20c89>>
* @generated SignedSource<<2f795a10a9de5d60ddf07671aa7b7c9d>>
*/

/**
Expand All @@ -30,6 +30,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var disableSubviewClippingAndroidCache: Boolean? = null
private var disableTextLayoutManagerCacheAndroidCache: Boolean? = null
private var disableViewPreallocationAndroidCache: Boolean? = null
private var discordSkipUnchangedYogaDirtyCache: Boolean? = null
private var discordUiManagerOptimizationCache: Double? = null
private var enableAccessibilityOrderCache: Boolean? = null
private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null
Expand Down Expand Up @@ -210,6 +211,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun discordUiManagerOptimization(): Double {
var cached = discordUiManagerOptimizationCache
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<<1492421cd4b9bca791ee9ad5f87507a3>>
* @generated SignedSource<<6f18835027df02bd21bdd2fb295d6c6d>>
*/

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

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

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

@DoNotStrip @JvmStatic public external fun discordUiManagerOptimization(): Double

@DoNotStrip @JvmStatic public external fun enableAccessibilityOrder(): 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<<462ac270e53d73922c29341d2bf557cc>>
* @generated SignedSource<<3237443af97e85729b05a4ce9774ec3a>>
*/

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

override fun disableViewPreallocationAndroid(): Boolean = false

override fun discordSkipUnchangedYogaDirty(): Boolean = false

override fun discordUiManagerOptimization(): Double = 0.0

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

/**
Expand Down Expand Up @@ -34,6 +34,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var disableSubviewClippingAndroidCache: Boolean? = null
private var disableTextLayoutManagerCacheAndroidCache: Boolean? = null
private var disableViewPreallocationAndroidCache: Boolean? = null
private var discordSkipUnchangedYogaDirtyCache: Boolean? = null
private var discordUiManagerOptimizationCache: Double? = null
private var enableAccessibilityOrderCache: Boolean? = null
private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null
Expand Down Expand Up @@ -224,6 +225,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

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

override fun discordUiManagerOptimization(): Double {
var cached = discordUiManagerOptimizationCache
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<<ba69b300b057a5696d76bd1a667b91d0>>
* @generated SignedSource<<c8623cdace316b0ad87310e31713d62a>>
*/

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

@DoNotStrip public fun disableViewPreallocationAndroid(): Boolean

@DoNotStrip public fun discordSkipUnchangedYogaDirty(): Boolean

@DoNotStrip public fun discordUiManagerOptimization(): Double

@DoNotStrip public fun enableAccessibilityOrder(): 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<<fd827f02cf87afa56d3827c6fd29a31f>>
* @generated SignedSource<<79f454a4ac0fe044f40517855ba49deb>>
*/

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

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

double discordUiManagerOptimization() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jdouble()>("discordUiManagerOptimization");
Expand Down Expand Up @@ -687,6 +693,11 @@ bool JReactNativeFeatureFlagsCxxInterop::disableViewPreallocationAndroid(
return ReactNativeFeatureFlags::disableViewPreallocationAndroid();
}

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

double JReactNativeFeatureFlagsCxxInterop::discordUiManagerOptimization(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::discordUiManagerOptimization();
Expand Down Expand Up @@ -1193,6 +1204,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"disableViewPreallocationAndroid",
JReactNativeFeatureFlagsCxxInterop::disableViewPreallocationAndroid),
makeNativeMethod(
"discordSkipUnchangedYogaDirty",
JReactNativeFeatureFlagsCxxInterop::discordSkipUnchangedYogaDirty),
makeNativeMethod(
"discordUiManagerOptimization",
JReactNativeFeatureFlagsCxxInterop::discordUiManagerOptimization),
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<<584ebd805c4a72383eb1e07ef28d490b>>
* @generated SignedSource<<49862609637dde695866d149949bcc3a>>
*/

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

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

static double discordUiManagerOptimization(
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<<8a37279e2d9a281cdeb43356993ec0a9>>
* @generated SignedSource<<c2a60eba30efd3d3d1fa4f0f2218d421>>
*/

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

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

double ReactNativeFeatureFlags::discordUiManagerOptimization() {
return getAccessor().discordUiManagerOptimization();
}
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<<01cfdab8946e251169d6a69ed712d57e>>
* @generated SignedSource<<096729bde9a4580be6756ff8f7bb5045>>
*/

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

/**
* Skip dirtying Yoga nodes in setSize/setPositionType when the value is unchanged (react-native#59101).
*/
RN_EXPORT static bool discordSkipUnchangedYogaDirty();

/**
* Select UIManager optimizations: 0 = none, 1 = preserve lazy properties, 2 = load view manager constants on demand.
*/
Expand Down
Loading