Skip to content

Commit a81429b

Browse files
authored
Promote C++ Native Animated to stable (#59936)
Summary: Release the `cxxNativeAnimatedEnabled` feature flag: flip its default to `true` and promote its OSS release stage from canary to stable, so the C++ implementation of Native Animated is used instead of the platform implementations on all releases. Changelog: [General][Changed] - Promote C++ Native Animated to stable (`cxxNativeAnimatedEnabled`) Reviewed By: javache Differential Revision: D131213858 Pull Request resolved: #59936
1 parent cf436ce commit a81429b

7 files changed

Lines changed: 14 additions & 16 deletions

File tree

‎packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<8d78035933e7e32cceb8968564726198>>
7+
* @generated SignedSource<<cbf3f79d07f0a7e360cae6cbf3e944c2>>
88
*/
99

1010
/**
@@ -27,7 +27,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
2727

2828
override fun cdpInteractionMetricsEnabled(): Boolean = false
2929

30-
override fun cxxNativeAnimatedEnabled(): Boolean = false
30+
override fun cxxNativeAnimatedEnabled(): Boolean = true
3131

3232
override fun defaultTextToOverflowHidden(): Boolean = true
3333

‎packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android.kt‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<b1c2d06f2a2dbcfcb3efcead6da64e30>>
7+
* @generated SignedSource<<b01595e58efedbdf98f4af48b1a2c424>>
88
*/
99

1010
/**
@@ -23,8 +23,6 @@ public open class ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android : ReactN
2323
// We could use JNI to get the defaults from C++,
2424
// but that is more expensive than just duplicating the defaults here.
2525

26-
override fun cxxNativeAnimatedEnabled(): Boolean = true
27-
2826
override fun enableAccessibilityOrder(): Boolean = true
2927

3028
override fun enableImperativeEvents(): Boolean = true

‎packages/react-native/ReactAndroid/src/test/java/com/facebook/react/fabric/FabricUIManagerPullModelTest.kt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ class FabricUIManagerPullModelTest {
122122

123123
override fun disableEarlyViewCommandExecution(): Boolean =
124124
disableEarlyViewCommandExecution
125+
126+
// C++ Native Animated keeps the frame callback armed every frame, which disables the
127+
// idle disarm these tests cover.
128+
override fun cxxNativeAnimatedEnabled(): Boolean = false
125129
},
126130
)
127131
}

‎packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<cd752a835362c228436ffeab321a9cea>>
7+
* @generated SignedSource<<0d3bb7075eb6c56705ca92778df53ee2>>
88
*/
99

1010
/**
@@ -38,7 +38,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
3838
}
3939

4040
bool cxxNativeAnimatedEnabled() override {
41-
return false;
41+
return true;
4242
}
4343

4444
bool defaultTextToOverflowHidden() override {

‎packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<40e11c065544ce9f611779eb21f6522d>>
7+
* @generated SignedSource<<d3b88c7fb5c65ab1a0196315f33dea98>>
88
*/
99

1010
/**
@@ -29,10 +29,6 @@ class ReactNativeFeatureFlagsOverridesOSSCanary : public ReactNativeFeatureFlags
2929
public:
3030
ReactNativeFeatureFlagsOverridesOSSCanary() = default;
3131

32-
bool cxxNativeAnimatedEnabled() override {
33-
return true;
34-
}
35-
3632
bool enableAccessibilityOrder() override {
3733
return true;
3834
}

‎packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ const definitions: FeatureFlagDefinitions = {
7272
ossReleaseStage: 'none',
7373
},
7474
cxxNativeAnimatedEnabled: {
75-
defaultValue: false,
75+
defaultValue: true,
7676
metadata: {
7777
dateAdded: '2025-03-14',
7878
description:
7979
'Use a C++ implementation of Native Animated instead of the platform implementation.',
8080
expectedReleaseValue: true,
8181
purpose: 'experimentation',
8282
},
83-
ossReleaseStage: 'canary',
83+
ossReleaseStage: 'stable',
8484
},
8585
defaultTextToOverflowHidden: {
8686
defaultValue: true,

‎packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<9745db68f9d0fe8cccfddac2e8ffee30>>
7+
* @generated SignedSource<<9568202bd43aba18de332e6d411a0458>>
88
* @flow strict
99
* @noformat
1010
*/
@@ -229,7 +229,7 @@ export const cdpInteractionMetricsEnabled: Getter<boolean> = createNativeFlagGet
229229
/**
230230
* Use a C++ implementation of Native Animated instead of the platform implementation.
231231
*/
232-
export const cxxNativeAnimatedEnabled: Getter<boolean> = createNativeFlagGetter('cxxNativeAnimatedEnabled', false);
232+
export const cxxNativeAnimatedEnabled: Getter<boolean> = createNativeFlagGetter('cxxNativeAnimatedEnabled', true);
233233
/**
234234
* When enabled, sets the default overflow style for Text components to hidden instead of visible.
235235
*/

0 commit comments

Comments
 (0)