Skip to content

Commit fc4e706

Browse files
j-piaseckimeta-codesync[bot]
authored andcommitted
Expose mounting pull-model flag; background image frameworks tier (#59028)
Summary: Pull Request resolved: #59028 - Expose `enableMountingCoordinatorPullModelAndroid` through `ReactNativeFeatureFlags_DO_NOT_USE`. - Move `BackgroundImagePropsConversions.h` from private to "for frameworks" and include `<React/Graphics.h>`/`<React/RendererCore.h>` instead of direct headers. Changelog: [General][Changed] - Expose `enableMountingCoordinatorPullModelAndroid` in public C++ feature flags and move `BackgroundImagePropsConversions.h` to "for frameworks" headers Reviewed By: christophpurrer Differential Revision: D124958546 fbshipit-source-id: ad34a7a263b6d005383c4e890d5453d4ede36663
1 parent b6a09aa commit fc4e706

7 files changed

Lines changed: 27 additions & 6 deletions

File tree

‎packages/react-native/ReactCommon/react/featureflags/ReactNativePublicFeatureFlags.cpp‎

Lines changed: 5 additions & 1 deletion
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<<95f86b3476aeff097f532b10cabf067e>>
7+
* @generated SignedSource<<edb5f3ea1228c0bf6832969117b159da>>
88
*/
99

1010
/**
@@ -34,6 +34,10 @@ bool ReactNativeFeatureFlags_DO_NOT_USE::enableExclusivePropsUpdateAndroid() {
3434
return ReactNativeFeatureFlags::enableExclusivePropsUpdateAndroid();
3535
}
3636

37+
bool ReactNativeFeatureFlags_DO_NOT_USE::enableMountingCoordinatorPullModelAndroid() {
38+
return ReactNativeFeatureFlags::enableMountingCoordinatorPullModelAndroid();
39+
}
40+
3741
bool ReactNativeFeatureFlags_DO_NOT_USE::enableNativeCSSParsing() {
3842
return ReactNativeFeatureFlags::enableNativeCSSParsing();
3943
}

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

Lines changed: 6 additions & 1 deletion
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<<39037a69a47b86d0c6643d90f4058002>>
7+
* @generated SignedSource<<bebfd984dd561fabb12c848ff536bfac>>
88
*/
99

1010
/**
@@ -47,6 +47,11 @@ class ReactNativeFeatureFlags_DO_NOT_USE {
4747
*/
4848
RN_EXPORT static bool enableExclusivePropsUpdateAndroid();
4949

50+
/**
51+
* When enabled, Android mounts transactions with the pull model (like iOS): the commit thread no longer pulls and builds the mount batch in schedulerShouldRenderTransactions. Instead the UI thread pulls the transaction itself via a PullTransactionMountItem enqueued in the MountItemDispatcher, builds the IntBufferBatchMountItem, and applies it synchronously. Requires `enableAccumulatedUpdatesInRawPropsAndroid` to be enabled as well, since a single pull may collapse several commits into one diff and therefore needs complete accumulated rawProps; when used together with Props 2.0, also enable `enableExclusivePropsUpdateAndroid` and `enablePropsUpdateReconciliationAndroid`.
52+
*/
53+
RN_EXPORT static bool enableMountingCoordinatorPullModelAndroid();
54+
5055
/**
5156
* Parse CSS strings using the Fabric CSS parser instead of ViewConfig processing
5257
*/

‎packages/react-native/ReactCommon/react/renderer/components/view/BackgroundImagePropsConversions.h‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/PrivateGuard.h>
10+
#include <react/cxxstableapi/FrameworksGuard.h>
1111

12+
#include <React/Graphics.h>
13+
#include <React/RendererCore.h>
1214
#include <react/featureflags/ReactNativePublicFeatureFlags.h>
13-
#include <react/renderer/core/PropsParserContext.h>
14-
#include <react/renderer/core/RawProps.h>
15-
#include <react/renderer/graphics/BackgroundImage.h>
1615

1716
namespace facebook::react {
1817

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ const definitions: FeatureFlagDefinitions = {
512512
ossReleaseStage: 'none',
513513
},
514514
enableMountingCoordinatorPullModelAndroid: {
515+
dangerouslyExposeInPublicCppHeaders: true,
515516
defaultValue: false,
516517
metadata: {
517518
dateAdded: '2026-07-14',

‎scripts/cxx-api/api-snapshots/ReactAndroidFrameworksCxx.api‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,7 @@ void facebook::react::fromRawValue(const facebook::react::PropsParserContext& co
923923
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, facebook::yoga::PositionType& result);
924924
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, facebook::yoga::Style::Length& result);
925925
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, facebook::yoga::Wrap& result);
926+
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector<facebook::react::BackgroundImage>& result);
926927
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& value, facebook::react::AccessibilityValue& result);
927928
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& value, facebook::react::BlendMode& result);
928929
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& value, facebook::react::CornerInsets& result);
@@ -946,7 +947,10 @@ void facebook::react::fromRawValueShared(const facebook::react::ContextContainer
946947
void facebook::react::fromString(const std::string& string, facebook::react::AccessibilityTraits& result);
947948
void facebook::react::g_setNativeAnimatedNowTimestampFunction(facebook::react::TimePointFunction nowFunction);
948949
void facebook::react::handleJSError(facebook::jsi::Runtime& runtime, const facebook::jsi::JSError& error, bool isFatal);
950+
void facebook::react::parseProcessedBackgroundImage(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector<facebook::react::BackgroundImage>& result);
949951
void facebook::react::parseProcessedFontVariant(const facebook::react::PropsParserContext&, const facebook::react::RawValue& value, facebook::react::FontVariant& result);
952+
void facebook::react::parseUnprocessedBackgroundImageList(const facebook::react::PropsParserContext& context, const std::vector<facebook::react::RawValue>& value, std::vector<facebook::react::BackgroundImage>& result);
953+
void facebook::react::parseUnprocessedBackgroundImageString(const std::string& value, std::vector<facebook::react::BackgroundImage>& result);
950954
void facebook::react::parseUnprocessedFontVariant(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, facebook::react::FontVariant& result);
951955
void facebook::react::parseUnprocessedFontVariantString(const std::string& value, facebook::react::FontVariant& result);
952956
void facebook::react::parseUnprocessedTransformOriginString(const std::string& value, facebook::react::TransformOrigin& result);

‎scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3710,6 +3710,7 @@ void facebook::react::fromRawValue(const facebook::react::PropsParserContext& co
37103710
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, facebook::yoga::PositionType& result);
37113711
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, facebook::yoga::Style::Length& result);
37123712
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, facebook::yoga::Wrap& result);
3713+
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector<facebook::react::BackgroundImage>& result);
37133714
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& value, facebook::react::AccessibilityValue& result);
37143715
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& value, facebook::react::BlendMode& result);
37153716
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& value, facebook::react::CornerInsets& result);
@@ -3734,7 +3735,10 @@ void facebook::react::fromString(const std::string& string, facebook::react::Acc
37343735
void facebook::react::g_setNativeAnimatedNowTimestampFunction(facebook::react::TimePointFunction nowFunction);
37353736
void facebook::react::handleJSError(facebook::jsi::Runtime& runtime, const facebook::jsi::JSError& error, bool isFatal);
37363737
void facebook::react::installLegacyUIManagerConstantsProviderBinding(facebook::jsi::Runtime& runtime);
3738+
void facebook::react::parseProcessedBackgroundImage(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector<facebook::react::BackgroundImage>& result);
37373739
void facebook::react::parseProcessedFontVariant(const facebook::react::PropsParserContext&, const facebook::react::RawValue& value, facebook::react::FontVariant& result);
3740+
void facebook::react::parseUnprocessedBackgroundImageList(const facebook::react::PropsParserContext& context, const std::vector<facebook::react::RawValue>& value, std::vector<facebook::react::BackgroundImage>& result);
3741+
void facebook::react::parseUnprocessedBackgroundImageString(const std::string& value, std::vector<facebook::react::BackgroundImage>& result);
37383742
void facebook::react::parseUnprocessedFontVariant(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, facebook::react::FontVariant& result);
37393743
void facebook::react::parseUnprocessedFontVariantString(const std::string& value, facebook::react::FontVariant& result);
37403744
void facebook::react::parseUnprocessedTransformOriginString(const std::string& value, facebook::react::TransformOrigin& result);

‎scripts/cxx-api/api-snapshots/ReactCommonFrameworksCxx.api‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ void facebook::react::fromRawValue(const facebook::react::PropsParserContext& co
489489
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, facebook::yoga::PositionType& result);
490490
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, facebook::yoga::Style::Length& result);
491491
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, facebook::yoga::Wrap& result);
492+
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector<facebook::react::BackgroundImage>& result);
492493
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& value, facebook::react::AccessibilityValue& result);
493494
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& value, facebook::react::BlendMode& result);
494495
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& value, facebook::react::CornerInsets& result);
@@ -512,7 +513,10 @@ void facebook::react::fromRawValueShared(const facebook::react::ContextContainer
512513
void facebook::react::fromString(const std::string& string, facebook::react::AccessibilityTraits& result);
513514
void facebook::react::g_setNativeAnimatedNowTimestampFunction(facebook::react::TimePointFunction nowFunction);
514515
void facebook::react::handleJSError(facebook::jsi::Runtime& runtime, const facebook::jsi::JSError& error, bool isFatal);
516+
void facebook::react::parseProcessedBackgroundImage(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector<facebook::react::BackgroundImage>& result);
515517
void facebook::react::parseProcessedFontVariant(const facebook::react::PropsParserContext&, const facebook::react::RawValue& value, facebook::react::FontVariant& result);
518+
void facebook::react::parseUnprocessedBackgroundImageList(const facebook::react::PropsParserContext& context, const std::vector<facebook::react::RawValue>& value, std::vector<facebook::react::BackgroundImage>& result);
519+
void facebook::react::parseUnprocessedBackgroundImageString(const std::string& value, std::vector<facebook::react::BackgroundImage>& result);
516520
void facebook::react::parseUnprocessedFontVariant(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, facebook::react::FontVariant& result);
517521
void facebook::react::parseUnprocessedFontVariantString(const std::string& value, facebook::react::FontVariant& result);
518522
void facebook::react::parseUnprocessedTransformOriginString(const std::string& value, facebook::react::TransformOrigin& result);

0 commit comments

Comments
 (0)