Skip to content
Closed
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,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @fantom_flags useShadowNodeStateOnClone:true
* @fantom_flags updateRuntimeShadowNodeReferencesOnCommit:*
* @flow strict-local
* @format
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<<8cca42a9160a8a0e307a00e53cad46e8>>
* @generated SignedSource<<2329e4100b9b70dce294c618d0616e98>>
*/

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

/**
* Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family.
*/
@JvmStatic
public fun useShadowNodeStateOnClone(): Boolean = accessor.useShadowNodeStateOnClone()

/**
* Use shared animation backend in C++ Animated
*/
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<<2adb48ad6907058ba092af9703994a57>>
* @generated SignedSource<<ddaac394d5d58b2dd3416f5155d4df03>>
*/

/**
Expand Down Expand Up @@ -92,7 +92,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
private var useFabricInteropCache: Boolean? = null
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
private var useShadowNodeStateOnCloneCache: Boolean? = null
private var useSharedAnimatedBackendCache: Boolean? = null
private var useTraitHiddenOnAndroidCache: Boolean? = null
private var useTurboModuleInteropCache: Boolean? = null
Expand Down Expand Up @@ -748,15 +747,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun useSharedAnimatedBackend(): Boolean {
var cached = useSharedAnimatedBackendCache
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<<54ca4d2bf514ce152b2f566205716aa6>>
* @generated SignedSource<<d39b29af72f9e1830af35d856952e317>>
*/

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

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

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

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

@DoNotStrip @JvmStatic public external fun useTraitHiddenOnAndroid(): 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<<8f895394bc6263275f42c0bfa10674b4>>
* @generated SignedSource<<293c71559a8101698003f517a98af514>>
*/

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

override fun useNativeViewConfigsInBridgelessMode(): Boolean = false

override fun useShadowNodeStateOnClone(): Boolean = true

override fun useSharedAnimatedBackend(): Boolean = false

override fun useTraitHiddenOnAndroid(): 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<<45b7473c077eb6fd4c2b46712962ddbd>>
* @generated SignedSource<<0f1bedf79aaaddc0ff69155ad4593ad3>>
*/

/**
Expand Down Expand Up @@ -96,7 +96,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
private var useFabricInteropCache: Boolean? = null
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
private var useShadowNodeStateOnCloneCache: Boolean? = null
private var useSharedAnimatedBackendCache: Boolean? = null
private var useTraitHiddenOnAndroidCache: Boolean? = null
private var useTurboModuleInteropCache: Boolean? = null
Expand Down Expand Up @@ -824,16 +823,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

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

override fun useSharedAnimatedBackend(): Boolean {
var cached = useSharedAnimatedBackendCache
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<<d50ebf5805d13b4da427ce1318c6cabc>>
* @generated SignedSource<<85087ed95d67c12c6ac8dbf433284d1d>>
*/

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

@DoNotStrip public fun useNativeViewConfigsInBridgelessMode(): Boolean

@DoNotStrip public fun useShadowNodeStateOnClone(): Boolean

@DoNotStrip public fun useSharedAnimatedBackend(): Boolean

@DoNotStrip public fun useTraitHiddenOnAndroid(): 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<<77d79172d377c62d4d26ddd16dab56ec>>
* @generated SignedSource<<131ba2b067fb63576bbc94cfb2521d06>>
*/

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

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

bool useSharedAnimatedBackend() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useSharedAnimatedBackend");
Expand Down Expand Up @@ -877,11 +871,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode(
return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode();
}

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

bool JReactNativeFeatureFlagsCxxInterop::useSharedAnimatedBackend(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::useSharedAnimatedBackend();
Expand Down Expand Up @@ -1159,9 +1148,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"useNativeViewConfigsInBridgelessMode",
JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode),
makeNativeMethod(
"useShadowNodeStateOnClone",
JReactNativeFeatureFlagsCxxInterop::useShadowNodeStateOnClone),
makeNativeMethod(
"useSharedAnimatedBackend",
JReactNativeFeatureFlagsCxxInterop::useSharedAnimatedBackend),
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<<35b3b4933e2c337c4d924c2cc545eac6>>
* @generated SignedSource<<c08164df224d384271a3808d8117afb5>>
*/

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

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

static bool useSharedAnimatedBackend(
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<<fa1074c6da1ee0be0ba9160e63f8958f>>
* @generated SignedSource<<3df4827c2f80663280d762d64448873f>>
*/

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

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

bool ReactNativeFeatureFlags::useSharedAnimatedBackend() {
return getAccessor().useSharedAnimatedBackend();
}
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<<94420e56d4980f03465c949a42cb6062>>
* @generated SignedSource<<3e7c529929a70e9539193237baed2e89>>
*/

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

/**
* Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family.
*/
RN_EXPORT static bool useShadowNodeStateOnClone();

/**
* Use shared animation backend in C++ Animated
*/
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<<b64fab8f58e9e6bebaa8459e2ce38a68>>
* @generated SignedSource<<9ec16e6422e98c7afd1c0d7d776779fa>>
*/

/**
Expand Down Expand Up @@ -1325,24 +1325,6 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
return flagValue.value();
}

bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
auto flagValue = useShadowNodeStateOnClone_.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(72, "useShadowNodeStateOnClone");

flagValue = currentProvider_->useShadowNodeStateOnClone();
useShadowNodeStateOnClone_ = flagValue;
}

return flagValue.value();
}

bool ReactNativeFeatureFlagsAccessor::useSharedAnimatedBackend() {
auto flagValue = useSharedAnimatedBackend_.load();

Expand All @@ -1352,7 +1334,7 @@ bool ReactNativeFeatureFlagsAccessor::useSharedAnimatedBackend() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(73, "useSharedAnimatedBackend");
markFlagAsAccessed(72, "useSharedAnimatedBackend");

flagValue = currentProvider_->useSharedAnimatedBackend();
useSharedAnimatedBackend_ = flagValue;
Expand All @@ -1370,7 +1352,7 @@ bool ReactNativeFeatureFlagsAccessor::useTraitHiddenOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(74, "useTraitHiddenOnAndroid");
markFlagAsAccessed(73, "useTraitHiddenOnAndroid");

flagValue = currentProvider_->useTraitHiddenOnAndroid();
useTraitHiddenOnAndroid_ = flagValue;
Expand All @@ -1388,7 +1370,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(75, "useTurboModuleInterop");
markFlagAsAccessed(74, "useTurboModuleInterop");

flagValue = currentProvider_->useTurboModuleInterop();
useTurboModuleInterop_ = flagValue;
Expand All @@ -1406,7 +1388,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(76, "useTurboModules");
markFlagAsAccessed(75, "useTurboModules");

flagValue = currentProvider_->useTurboModules();
useTurboModules_ = flagValue;
Expand All @@ -1424,7 +1406,7 @@ double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(77, "viewCullingOutsetRatio");
markFlagAsAccessed(76, "viewCullingOutsetRatio");

flagValue = currentProvider_->viewCullingOutsetRatio();
viewCullingOutsetRatio_ = flagValue;
Expand All @@ -1442,7 +1424,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(78, "virtualViewPrerenderRatio");
markFlagAsAccessed(77, "virtualViewPrerenderRatio");

flagValue = currentProvider_->virtualViewPrerenderRatio();
virtualViewPrerenderRatio_ = flagValue;
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<<c10e865da81b58620a2d3673650cec76>>
* @generated SignedSource<<a988a1145e1437cd8444dda3863c6065>>
*/

/**
Expand Down Expand Up @@ -104,7 +104,6 @@ class ReactNativeFeatureFlagsAccessor {
bool useAlwaysAvailableJSErrorHandling();
bool useFabricInterop();
bool useNativeViewConfigsInBridgelessMode();
bool useShadowNodeStateOnClone();
bool useSharedAnimatedBackend();
bool useTraitHiddenOnAndroid();
bool useTurboModuleInterop();
Expand All @@ -122,7 +121,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;

std::array<std::atomic<const char*>, 79> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 78> accessedFeatureFlags_;

std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
Expand Down Expand Up @@ -196,7 +195,6 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> useAlwaysAvailableJSErrorHandling_;
std::atomic<std::optional<bool>> useFabricInterop_;
std::atomic<std::optional<bool>> useNativeViewConfigsInBridgelessMode_;
std::atomic<std::optional<bool>> useShadowNodeStateOnClone_;
std::atomic<std::optional<bool>> useSharedAnimatedBackend_;
std::atomic<std::optional<bool>> useTraitHiddenOnAndroid_;
std::atomic<std::optional<bool>> useTurboModuleInterop_;
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<<9ac153a95e55474403a3d4c47ff7c484>>
* @generated SignedSource<<6a4d99365bdd62d89ab5b33dd014bed3>>
*/

/**
Expand Down Expand Up @@ -315,10 +315,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}

bool useShadowNodeStateOnClone() override {
return true;
}

bool useSharedAnimatedBackend() override {
return false;
}
Expand Down
Loading
Loading