Change to use new Background and Border drawables by default (#50828)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50828

The new Background and Border drawables come with some correctness improvements and potential small perf gains on edge cases. We are now switching to using them by default.

Changelog: [Android][Changed] - Change to use new Background and new Border drawables by default

Reviewed By: NickGerleman

Differential Revision: D72082947

fbshipit-source-id: 7caeb279110b520bea760a4621184dc0de05cf78
This commit is contained in:
Jorge Cabiedes Acosta
2025-04-21 17:35:12 -07:00
committed by Facebook GitHub Bot
parent aa89f7a01c
commit 132a871b46
4 changed files with 7 additions and 7 deletions
@@ -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<<6f24701d1581b744185caaee1ca5fc06>>
* @generated SignedSource<<cc12c314bd1f9116af50f4653fe71521>>
*/
/**
@@ -63,7 +63,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun enableNativeCSSParsing(): Boolean = false
override fun enableNewBackgroundAndBorderDrawables(): Boolean = false
override fun enableNewBackgroundAndBorderDrawables(): Boolean = true
override fun enablePropsUpdateReconciliationAndroid(): Boolean = false
@@ -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<<377c3de6bcd7de45efa0d58e0de94fb1>>
* @generated SignedSource<<febce599420f496a5b0f38903565a189>>
*/
/**
@@ -108,7 +108,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
}
bool enableNewBackgroundAndBorderDrawables() override {
return false;
return true;
}
bool enablePropsUpdateReconciliationAndroid() override {
@@ -257,7 +257,7 @@ const definitions: FeatureFlagDefinitions = {
ossReleaseStage: 'none',
},
enableNewBackgroundAndBorderDrawables: {
defaultValue: false,
defaultValue: true,
metadata: {
dateAdded: '2024-09-24',
description:
@@ -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<<23e97cba20fdf4afc991cbae70c57b1f>>
* @generated SignedSource<<33e6d0e756c6eaff90e5a50a8a482d24>>
* @flow strict
*/
@@ -237,7 +237,7 @@ export const enableNativeCSSParsing: Getter<boolean> = createNativeFlagGetter('e
/**
* Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable
*/
export const enableNewBackgroundAndBorderDrawables: Getter<boolean> = createNativeFlagGetter('enableNewBackgroundAndBorderDrawables', false);
export const enableNewBackgroundAndBorderDrawables: Getter<boolean> = createNativeFlagGetter('enableNewBackgroundAndBorderDrawables', true);
/**
* When enabled, Android will receive prop updates based on the differences between the last rendered shadow node and the last committed shadow node.
*/