react-native-tvos 0.74.0-0rc3 → 0.74.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/AppDelegate/RCTAppDelegate+Protected.h +16 -0
- package/Libraries/AppDelegate/RCTAppDelegate.mm +32 -1
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +1 -0
- package/Libraries/Components/Pressable/Pressable.js +9 -5
- package/Libraries/Components/TextInput/TextInput.js +6 -3
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/ReactNative/RendererImplementation.js +2 -0
- package/README.md +29 -9
- package/React/Base/RCTUtils.m +28 -8
- package/React/Base/RCTVersion.m +2 -2
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +2 -4
- package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.mm +22 -2
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +5 -1
- package/React/Fabric/RCTScheduler.h +2 -0
- package/React/Fabric/RCTScheduler.mm +6 -0
- package/React/Fabric/RCTSurfacePresenter.mm +5 -0
- package/React/Modules/RCTUIManager.m +8 -9
- package/React/Views/RCTComponentData.m +14 -1
- package/React/Views/ScrollView/RCTScrollView.m +30 -14
- package/ReactAndroid/api/ReactAndroid.api +1 -2
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java +24 -9
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +19 -7
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +31 -11
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +34 -12
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessCatalystInstance.kt +11 -18
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +27 -14
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.java +1 -3
- package/ReactAndroid/src/main/jni/react/fabric/Binding.cpp +38 -3
- package/ReactAndroid/src/main/jni/react/fabric/Binding.h +8 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +43 -15
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +10 -4
- package/ReactCommon/ReactCommon.podspec +1 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/jsc/JSCRuntime.cpp +2 -0
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +2 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +13 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +16 -6
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +62 -26
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +8 -4
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +13 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +4 -2
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +16 -6
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +7 -3
- package/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.cpp +53 -1
- package/ReactCommon/react/renderer/mounting/MountingTransaction.cpp +13 -0
- package/ReactCommon/react/renderer/mounting/MountingTransaction.h +9 -0
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +7 -2
- package/ReactCommon/react/renderer/scheduler/SchedulerDelegate.h +11 -0
- package/cli.js +11 -3
- package/package.json +12 -12
- package/scripts/cocoapods/privacy_manifest_utils.rb +173 -0
- package/scripts/cocoapods/utils.rb +1 -38
- package/scripts/ios-configure-glog.sh +9 -2
- package/scripts/react_native_pods.rb +14 -3
- package/sdks/.hermesversion +1 -1
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/src/private/featureflags/NativeReactNativeFeatureFlags.js +4 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +16 -6
- package/template/package.json +5 -5
- package/third-party-podspecs/RCT-Folly.podspec +1 -0
- package/types/public/ReactNativeTVTypes.d.ts +6 -10
- package/Libraries/React-Native +0 -214
- package/ReactAndroid/src/main/java/com/facebook/react/ReactAndroidHWInputDeviceHelper.java +0 -98
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<7ab741aec808bc3a138470fe18ef8b8a>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -45,6 +45,24 @@ class ReactNativeFeatureFlagsProviderHolder
|
|
|
45
45
|
return method(javaProvider_);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
bool androidEnablePendingFabricTransactions() override {
|
|
49
|
+
static const auto method =
|
|
50
|
+
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("androidEnablePendingFabricTransactions");
|
|
51
|
+
return method(javaProvider_);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
bool batchRenderingUpdatesInEventLoop() override {
|
|
55
|
+
static const auto method =
|
|
56
|
+
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("batchRenderingUpdatesInEventLoop");
|
|
57
|
+
return method(javaProvider_);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
bool destroyFabricSurfacesInReactInstanceManager() override {
|
|
61
|
+
static const auto method =
|
|
62
|
+
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("destroyFabricSurfacesInReactInstanceManager");
|
|
63
|
+
return method(javaProvider_);
|
|
64
|
+
}
|
|
65
|
+
|
|
48
66
|
bool enableBackgroundExecutor() override {
|
|
49
67
|
static const auto method =
|
|
50
68
|
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableBackgroundExecutor");
|
|
@@ -63,12 +81,6 @@ class ReactNativeFeatureFlagsProviderHolder
|
|
|
63
81
|
return method(javaProvider_);
|
|
64
82
|
}
|
|
65
83
|
|
|
66
|
-
bool batchRenderingUpdatesInEventLoop() override {
|
|
67
|
-
static const auto method =
|
|
68
|
-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("batchRenderingUpdatesInEventLoop");
|
|
69
|
-
return method(javaProvider_);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
84
|
bool enableSpannableBuildingUnification() override {
|
|
73
85
|
static const auto method =
|
|
74
86
|
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableSpannableBuildingUnification");
|
|
@@ -108,6 +120,21 @@ bool JReactNativeFeatureFlagsCxxInterop::commonTestFlag(
|
|
|
108
120
|
return ReactNativeFeatureFlags::commonTestFlag();
|
|
109
121
|
}
|
|
110
122
|
|
|
123
|
+
bool JReactNativeFeatureFlagsCxxInterop::androidEnablePendingFabricTransactions(
|
|
124
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
125
|
+
return ReactNativeFeatureFlags::androidEnablePendingFabricTransactions();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
bool JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop(
|
|
129
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
130
|
+
return ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
bool JReactNativeFeatureFlagsCxxInterop::destroyFabricSurfacesInReactInstanceManager(
|
|
134
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
135
|
+
return ReactNativeFeatureFlags::destroyFabricSurfacesInReactInstanceManager();
|
|
136
|
+
}
|
|
137
|
+
|
|
111
138
|
bool JReactNativeFeatureFlagsCxxInterop::enableBackgroundExecutor(
|
|
112
139
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
113
140
|
return ReactNativeFeatureFlags::enableBackgroundExecutor();
|
|
@@ -123,11 +150,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableMicrotasks(
|
|
|
123
150
|
return ReactNativeFeatureFlags::enableMicrotasks();
|
|
124
151
|
}
|
|
125
152
|
|
|
126
|
-
bool JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop(
|
|
127
|
-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
128
|
-
return ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop();
|
|
129
|
-
}
|
|
130
|
-
|
|
131
153
|
bool JReactNativeFeatureFlagsCxxInterop::enableSpannableBuildingUnification(
|
|
132
154
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
133
155
|
return ReactNativeFeatureFlags::enableSpannableBuildingUnification();
|
|
@@ -173,6 +195,15 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
|
|
173
195
|
makeNativeMethod(
|
|
174
196
|
"commonTestFlag",
|
|
175
197
|
JReactNativeFeatureFlagsCxxInterop::commonTestFlag),
|
|
198
|
+
makeNativeMethod(
|
|
199
|
+
"androidEnablePendingFabricTransactions",
|
|
200
|
+
JReactNativeFeatureFlagsCxxInterop::androidEnablePendingFabricTransactions),
|
|
201
|
+
makeNativeMethod(
|
|
202
|
+
"batchRenderingUpdatesInEventLoop",
|
|
203
|
+
JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop),
|
|
204
|
+
makeNativeMethod(
|
|
205
|
+
"destroyFabricSurfacesInReactInstanceManager",
|
|
206
|
+
JReactNativeFeatureFlagsCxxInterop::destroyFabricSurfacesInReactInstanceManager),
|
|
176
207
|
makeNativeMethod(
|
|
177
208
|
"enableBackgroundExecutor",
|
|
178
209
|
JReactNativeFeatureFlagsCxxInterop::enableBackgroundExecutor),
|
|
@@ -182,9 +213,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
|
|
182
213
|
makeNativeMethod(
|
|
183
214
|
"enableMicrotasks",
|
|
184
215
|
JReactNativeFeatureFlagsCxxInterop::enableMicrotasks),
|
|
185
|
-
makeNativeMethod(
|
|
186
|
-
"batchRenderingUpdatesInEventLoop",
|
|
187
|
-
JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop),
|
|
188
216
|
makeNativeMethod(
|
|
189
217
|
"enableSpannableBuildingUnification",
|
|
190
218
|
JReactNativeFeatureFlagsCxxInterop::enableSpannableBuildingUnification),
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<0d37cc1fb8217b0f4a849e178ec2ec68>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -33,6 +33,15 @@ class JReactNativeFeatureFlagsCxxInterop
|
|
|
33
33
|
static bool commonTestFlag(
|
|
34
34
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
35
35
|
|
|
36
|
+
static bool androidEnablePendingFabricTransactions(
|
|
37
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
38
|
+
|
|
39
|
+
static bool batchRenderingUpdatesInEventLoop(
|
|
40
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
41
|
+
|
|
42
|
+
static bool destroyFabricSurfacesInReactInstanceManager(
|
|
43
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
44
|
+
|
|
36
45
|
static bool enableBackgroundExecutor(
|
|
37
46
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
38
47
|
|
|
@@ -42,9 +51,6 @@ class JReactNativeFeatureFlagsCxxInterop
|
|
|
42
51
|
static bool enableMicrotasks(
|
|
43
52
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
44
53
|
|
|
45
|
-
static bool batchRenderingUpdatesInEventLoop(
|
|
46
|
-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
47
|
-
|
|
48
54
|
static bool enableSpannableBuildingUnification(
|
|
49
55
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
50
56
|
|
|
@@ -36,6 +36,7 @@ Pod::Spec.new do |s|
|
|
|
36
36
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
37
37
|
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
|
38
38
|
"USE_HEADERMAP" => "YES",
|
|
39
|
+
"DEFINES_MODULE" => "YES",
|
|
39
40
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
|
|
40
41
|
"GCC_WARN_PEDANTIC" => "YES" }
|
|
41
42
|
if ENV['USE_FRAMEWORKS']
|
|
@@ -17,8 +17,8 @@ namespace facebook::react {
|
|
|
17
17
|
constexpr struct {
|
|
18
18
|
int32_t Major = 0;
|
|
19
19
|
int32_t Minor = 74;
|
|
20
|
-
int32_t Patch =
|
|
21
|
-
std::string_view Prerelease = "
|
|
20
|
+
int32_t Patch = 2;
|
|
21
|
+
std::string_view Prerelease = "0";
|
|
22
22
|
} ReactNativeVersion;
|
|
23
23
|
|
|
24
24
|
} // namespace facebook::react
|
|
@@ -375,11 +375,13 @@ JSCRuntime::JSCRuntime(JSGlobalContextRef ctx)
|
|
|
375
375
|
{
|
|
376
376
|
#ifndef NDEBUG
|
|
377
377
|
#ifdef _JSC_HAS_INSPECTABLE
|
|
378
|
+
#if (__OSX_AVAILABLE_STARTING(MAC_NA, IPHONE_16_4))
|
|
378
379
|
if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {
|
|
379
380
|
JSGlobalContextSetInspectable(ctx_, true);
|
|
380
381
|
}
|
|
381
382
|
#endif
|
|
382
383
|
#endif
|
|
384
|
+
#endif
|
|
383
385
|
}
|
|
384
386
|
|
|
385
387
|
JSCRuntime::~JSCRuntime() {
|
|
@@ -38,7 +38,8 @@ Pod::Spec.new do |s|
|
|
|
38
38
|
s.compiler_flags = folly_compiler_flags
|
|
39
39
|
s.pod_target_xcconfig = {
|
|
40
40
|
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
|
|
41
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20"
|
|
41
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
|
|
42
|
+
"DEFINES_MODULE" => "YES"
|
|
42
43
|
}.merge!(use_frameworks ? {
|
|
43
44
|
"PUBLIC_HEADERS_FOLDER_PATH" => "#{module_name}.framework/Headers/#{header_dir}"
|
|
44
45
|
} : {})
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<7ba277e9902ca2a0b171daf223644b89>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -25,6 +25,18 @@ bool ReactNativeFeatureFlags::commonTestFlag() {
|
|
|
25
25
|
return getAccessor().commonTestFlag();
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
bool ReactNativeFeatureFlags::androidEnablePendingFabricTransactions() {
|
|
29
|
+
return getAccessor().androidEnablePendingFabricTransactions();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
bool ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop() {
|
|
33
|
+
return getAccessor().batchRenderingUpdatesInEventLoop();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
bool ReactNativeFeatureFlags::destroyFabricSurfacesInReactInstanceManager() {
|
|
37
|
+
return getAccessor().destroyFabricSurfacesInReactInstanceManager();
|
|
38
|
+
}
|
|
39
|
+
|
|
28
40
|
bool ReactNativeFeatureFlags::enableBackgroundExecutor() {
|
|
29
41
|
return getAccessor().enableBackgroundExecutor();
|
|
30
42
|
}
|
|
@@ -37,10 +49,6 @@ bool ReactNativeFeatureFlags::enableMicrotasks() {
|
|
|
37
49
|
return getAccessor().enableMicrotasks();
|
|
38
50
|
}
|
|
39
51
|
|
|
40
|
-
bool ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop() {
|
|
41
|
-
return getAccessor().batchRenderingUpdatesInEventLoop();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
52
|
bool ReactNativeFeatureFlags::enableSpannableBuildingUnification() {
|
|
45
53
|
return getAccessor().enableSpannableBuildingUnification();
|
|
46
54
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<bf4d30ecf78c8d2f65741c16d8d07bde>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -38,6 +38,21 @@ class ReactNativeFeatureFlags {
|
|
|
38
38
|
*/
|
|
39
39
|
static bool commonTestFlag();
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* To be used with batchRenderingUpdatesInEventLoop. When enbled, the Android mounting layer will concatenate pending transactions to ensure they're applied atomatically
|
|
43
|
+
*/
|
|
44
|
+
static bool androidEnablePendingFabricTransactions();
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.
|
|
48
|
+
*/
|
|
49
|
+
static bool batchRenderingUpdatesInEventLoop();
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* When enabled, ReactInstanceManager will clean up Fabric surfaces on destroy().
|
|
53
|
+
*/
|
|
54
|
+
static bool destroyFabricSurfacesInReactInstanceManager();
|
|
55
|
+
|
|
41
56
|
/**
|
|
42
57
|
* Enables the use of a background executor to compute layout and commit updates on Fabric (this system is deprecated and should not be used).
|
|
43
58
|
*/
|
|
@@ -53,11 +68,6 @@ class ReactNativeFeatureFlags {
|
|
|
53
68
|
*/
|
|
54
69
|
static bool enableMicrotasks();
|
|
55
70
|
|
|
56
|
-
/**
|
|
57
|
-
* When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.
|
|
58
|
-
*/
|
|
59
|
-
static bool batchRenderingUpdatesInEventLoop();
|
|
60
|
-
|
|
61
71
|
/**
|
|
62
72
|
* Uses new, deduplicated logic for constructing Android Spannables from text fragments
|
|
63
73
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<5311a007bec258c79bf1ca3e2355101c>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -47,8 +47,8 @@ bool ReactNativeFeatureFlagsAccessor::commonTestFlag() {
|
|
|
47
47
|
return flagValue.value();
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
bool ReactNativeFeatureFlagsAccessor::
|
|
51
|
-
auto flagValue =
|
|
50
|
+
bool ReactNativeFeatureFlagsAccessor::androidEnablePendingFabricTransactions() {
|
|
51
|
+
auto flagValue = androidEnablePendingFabricTransactions_.load();
|
|
52
52
|
|
|
53
53
|
if (!flagValue.has_value()) {
|
|
54
54
|
// This block is not exclusive but it is not necessary.
|
|
@@ -56,17 +56,17 @@ bool ReactNativeFeatureFlagsAccessor::enableBackgroundExecutor() {
|
|
|
56
56
|
// be accessing the provider multiple times but the end state of this
|
|
57
57
|
// instance and the returned flag value would be the same.
|
|
58
58
|
|
|
59
|
-
markFlagAsAccessed(1, "
|
|
59
|
+
markFlagAsAccessed(1, "androidEnablePendingFabricTransactions");
|
|
60
60
|
|
|
61
|
-
flagValue = currentProvider_->
|
|
62
|
-
|
|
61
|
+
flagValue = currentProvider_->androidEnablePendingFabricTransactions();
|
|
62
|
+
androidEnablePendingFabricTransactions_ = flagValue;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
return flagValue.value();
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
bool ReactNativeFeatureFlagsAccessor::
|
|
69
|
-
auto flagValue =
|
|
68
|
+
bool ReactNativeFeatureFlagsAccessor::batchRenderingUpdatesInEventLoop() {
|
|
69
|
+
auto flagValue = batchRenderingUpdatesInEventLoop_.load();
|
|
70
70
|
|
|
71
71
|
if (!flagValue.has_value()) {
|
|
72
72
|
// This block is not exclusive but it is not necessary.
|
|
@@ -74,17 +74,17 @@ bool ReactNativeFeatureFlagsAccessor::useModernRuntimeScheduler() {
|
|
|
74
74
|
// be accessing the provider multiple times but the end state of this
|
|
75
75
|
// instance and the returned flag value would be the same.
|
|
76
76
|
|
|
77
|
-
markFlagAsAccessed(2, "
|
|
77
|
+
markFlagAsAccessed(2, "batchRenderingUpdatesInEventLoop");
|
|
78
78
|
|
|
79
|
-
flagValue = currentProvider_->
|
|
80
|
-
|
|
79
|
+
flagValue = currentProvider_->batchRenderingUpdatesInEventLoop();
|
|
80
|
+
batchRenderingUpdatesInEventLoop_ = flagValue;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
return flagValue.value();
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
bool ReactNativeFeatureFlagsAccessor::
|
|
87
|
-
auto flagValue =
|
|
86
|
+
bool ReactNativeFeatureFlagsAccessor::destroyFabricSurfacesInReactInstanceManager() {
|
|
87
|
+
auto flagValue = destroyFabricSurfacesInReactInstanceManager_.load();
|
|
88
88
|
|
|
89
89
|
if (!flagValue.has_value()) {
|
|
90
90
|
// This block is not exclusive but it is not necessary.
|
|
@@ -92,17 +92,17 @@ bool ReactNativeFeatureFlagsAccessor::enableMicrotasks() {
|
|
|
92
92
|
// be accessing the provider multiple times but the end state of this
|
|
93
93
|
// instance and the returned flag value would be the same.
|
|
94
94
|
|
|
95
|
-
markFlagAsAccessed(3, "
|
|
95
|
+
markFlagAsAccessed(3, "destroyFabricSurfacesInReactInstanceManager");
|
|
96
96
|
|
|
97
|
-
flagValue = currentProvider_->
|
|
98
|
-
|
|
97
|
+
flagValue = currentProvider_->destroyFabricSurfacesInReactInstanceManager();
|
|
98
|
+
destroyFabricSurfacesInReactInstanceManager_ = flagValue;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
return flagValue.value();
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
bool ReactNativeFeatureFlagsAccessor::
|
|
105
|
-
auto flagValue =
|
|
104
|
+
bool ReactNativeFeatureFlagsAccessor::enableBackgroundExecutor() {
|
|
105
|
+
auto flagValue = enableBackgroundExecutor_.load();
|
|
106
106
|
|
|
107
107
|
if (!flagValue.has_value()) {
|
|
108
108
|
// This block is not exclusive but it is not necessary.
|
|
@@ -110,10 +110,46 @@ bool ReactNativeFeatureFlagsAccessor::batchRenderingUpdatesInEventLoop() {
|
|
|
110
110
|
// be accessing the provider multiple times but the end state of this
|
|
111
111
|
// instance and the returned flag value would be the same.
|
|
112
112
|
|
|
113
|
-
markFlagAsAccessed(4, "
|
|
113
|
+
markFlagAsAccessed(4, "enableBackgroundExecutor");
|
|
114
114
|
|
|
115
|
-
flagValue = currentProvider_->
|
|
116
|
-
|
|
115
|
+
flagValue = currentProvider_->enableBackgroundExecutor();
|
|
116
|
+
enableBackgroundExecutor_ = flagValue;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return flagValue.value();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
bool ReactNativeFeatureFlagsAccessor::useModernRuntimeScheduler() {
|
|
123
|
+
auto flagValue = useModernRuntimeScheduler_.load();
|
|
124
|
+
|
|
125
|
+
if (!flagValue.has_value()) {
|
|
126
|
+
// This block is not exclusive but it is not necessary.
|
|
127
|
+
// If multiple threads try to initialize the feature flag, we would only
|
|
128
|
+
// be accessing the provider multiple times but the end state of this
|
|
129
|
+
// instance and the returned flag value would be the same.
|
|
130
|
+
|
|
131
|
+
markFlagAsAccessed(5, "useModernRuntimeScheduler");
|
|
132
|
+
|
|
133
|
+
flagValue = currentProvider_->useModernRuntimeScheduler();
|
|
134
|
+
useModernRuntimeScheduler_ = flagValue;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return flagValue.value();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
bool ReactNativeFeatureFlagsAccessor::enableMicrotasks() {
|
|
141
|
+
auto flagValue = enableMicrotasks_.load();
|
|
142
|
+
|
|
143
|
+
if (!flagValue.has_value()) {
|
|
144
|
+
// This block is not exclusive but it is not necessary.
|
|
145
|
+
// If multiple threads try to initialize the feature flag, we would only
|
|
146
|
+
// be accessing the provider multiple times but the end state of this
|
|
147
|
+
// instance and the returned flag value would be the same.
|
|
148
|
+
|
|
149
|
+
markFlagAsAccessed(6, "enableMicrotasks");
|
|
150
|
+
|
|
151
|
+
flagValue = currentProvider_->enableMicrotasks();
|
|
152
|
+
enableMicrotasks_ = flagValue;
|
|
117
153
|
}
|
|
118
154
|
|
|
119
155
|
return flagValue.value();
|
|
@@ -128,7 +164,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSpannableBuildingUnification() {
|
|
|
128
164
|
// be accessing the provider multiple times but the end state of this
|
|
129
165
|
// instance and the returned flag value would be the same.
|
|
130
166
|
|
|
131
|
-
markFlagAsAccessed(
|
|
167
|
+
markFlagAsAccessed(7, "enableSpannableBuildingUnification");
|
|
132
168
|
|
|
133
169
|
flagValue = currentProvider_->enableSpannableBuildingUnification();
|
|
134
170
|
enableSpannableBuildingUnification_ = flagValue;
|
|
@@ -146,7 +182,7 @@ bool ReactNativeFeatureFlagsAccessor::enableCustomDrawOrderFabric() {
|
|
|
146
182
|
// be accessing the provider multiple times but the end state of this
|
|
147
183
|
// instance and the returned flag value would be the same.
|
|
148
184
|
|
|
149
|
-
markFlagAsAccessed(
|
|
185
|
+
markFlagAsAccessed(8, "enableCustomDrawOrderFabric");
|
|
150
186
|
|
|
151
187
|
flagValue = currentProvider_->enableCustomDrawOrderFabric();
|
|
152
188
|
enableCustomDrawOrderFabric_ = flagValue;
|
|
@@ -164,7 +200,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFixForClippedSubviewsCrash() {
|
|
|
164
200
|
// be accessing the provider multiple times but the end state of this
|
|
165
201
|
// instance and the returned flag value would be the same.
|
|
166
202
|
|
|
167
|
-
markFlagAsAccessed(
|
|
203
|
+
markFlagAsAccessed(9, "enableFixForClippedSubviewsCrash");
|
|
168
204
|
|
|
169
205
|
flagValue = currentProvider_->enableFixForClippedSubviewsCrash();
|
|
170
206
|
enableFixForClippedSubviewsCrash_ = flagValue;
|
|
@@ -182,7 +218,7 @@ bool ReactNativeFeatureFlagsAccessor::inspectorEnableCxxInspectorPackagerConnect
|
|
|
182
218
|
// be accessing the provider multiple times but the end state of this
|
|
183
219
|
// instance and the returned flag value would be the same.
|
|
184
220
|
|
|
185
|
-
markFlagAsAccessed(
|
|
221
|
+
markFlagAsAccessed(10, "inspectorEnableCxxInspectorPackagerConnection");
|
|
186
222
|
|
|
187
223
|
flagValue = currentProvider_->inspectorEnableCxxInspectorPackagerConnection();
|
|
188
224
|
inspectorEnableCxxInspectorPackagerConnection_ = flagValue;
|
|
@@ -200,7 +236,7 @@ bool ReactNativeFeatureFlagsAccessor::inspectorEnableModernCDPRegistry() {
|
|
|
200
236
|
// be accessing the provider multiple times but the end state of this
|
|
201
237
|
// instance and the returned flag value would be the same.
|
|
202
238
|
|
|
203
|
-
markFlagAsAccessed(
|
|
239
|
+
markFlagAsAccessed(11, "inspectorEnableModernCDPRegistry");
|
|
204
240
|
|
|
205
241
|
flagValue = currentProvider_->inspectorEnableModernCDPRegistry();
|
|
206
242
|
inspectorEnableModernCDPRegistry_ = flagValue;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<e67096a87dc73576add98d1d3ea6909b>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -32,10 +32,12 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
32
32
|
ReactNativeFeatureFlagsAccessor();
|
|
33
33
|
|
|
34
34
|
bool commonTestFlag();
|
|
35
|
+
bool androidEnablePendingFabricTransactions();
|
|
36
|
+
bool batchRenderingUpdatesInEventLoop();
|
|
37
|
+
bool destroyFabricSurfacesInReactInstanceManager();
|
|
35
38
|
bool enableBackgroundExecutor();
|
|
36
39
|
bool useModernRuntimeScheduler();
|
|
37
40
|
bool enableMicrotasks();
|
|
38
|
-
bool batchRenderingUpdatesInEventLoop();
|
|
39
41
|
bool enableSpannableBuildingUnification();
|
|
40
42
|
bool enableCustomDrawOrderFabric();
|
|
41
43
|
bool enableFixForClippedSubviewsCrash();
|
|
@@ -51,13 +53,15 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
51
53
|
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
|
52
54
|
bool wasOverridden_;
|
|
53
55
|
|
|
54
|
-
std::array<std::atomic<const char*>,
|
|
56
|
+
std::array<std::atomic<const char*>, 12> accessedFeatureFlags_;
|
|
55
57
|
|
|
56
58
|
std::atomic<std::optional<bool>> commonTestFlag_;
|
|
59
|
+
std::atomic<std::optional<bool>> androidEnablePendingFabricTransactions_;
|
|
60
|
+
std::atomic<std::optional<bool>> batchRenderingUpdatesInEventLoop_;
|
|
61
|
+
std::atomic<std::optional<bool>> destroyFabricSurfacesInReactInstanceManager_;
|
|
57
62
|
std::atomic<std::optional<bool>> enableBackgroundExecutor_;
|
|
58
63
|
std::atomic<std::optional<bool>> useModernRuntimeScheduler_;
|
|
59
64
|
std::atomic<std::optional<bool>> enableMicrotasks_;
|
|
60
|
-
std::atomic<std::optional<bool>> batchRenderingUpdatesInEventLoop_;
|
|
61
65
|
std::atomic<std::optional<bool>> enableSpannableBuildingUnification_;
|
|
62
66
|
std::atomic<std::optional<bool>> enableCustomDrawOrderFabric_;
|
|
63
67
|
std::atomic<std::optional<bool>> enableFixForClippedSubviewsCrash_;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<8a0f2e61752ae83a7a3032939f4a59fa>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -31,19 +31,27 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
|
|
31
31
|
return false;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
bool
|
|
34
|
+
bool androidEnablePendingFabricTransactions() override {
|
|
35
35
|
return false;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
bool
|
|
38
|
+
bool batchRenderingUpdatesInEventLoop() override {
|
|
39
39
|
return false;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
bool
|
|
42
|
+
bool destroyFabricSurfacesInReactInstanceManager() override {
|
|
43
43
|
return false;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
bool
|
|
46
|
+
bool enableBackgroundExecutor() override {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
bool useModernRuntimeScheduler() override {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
bool enableMicrotasks() override {
|
|
47
55
|
return false;
|
|
48
56
|
}
|
|
49
57
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<9194d576893a97a6d9b88f5a32c71197>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -26,10 +26,12 @@ class ReactNativeFeatureFlagsProvider {
|
|
|
26
26
|
virtual ~ReactNativeFeatureFlagsProvider() = default;
|
|
27
27
|
|
|
28
28
|
virtual bool commonTestFlag() = 0;
|
|
29
|
+
virtual bool androidEnablePendingFabricTransactions() = 0;
|
|
30
|
+
virtual bool batchRenderingUpdatesInEventLoop() = 0;
|
|
31
|
+
virtual bool destroyFabricSurfacesInReactInstanceManager() = 0;
|
|
29
32
|
virtual bool enableBackgroundExecutor() = 0;
|
|
30
33
|
virtual bool useModernRuntimeScheduler() = 0;
|
|
31
34
|
virtual bool enableMicrotasks() = 0;
|
|
32
|
-
virtual bool batchRenderingUpdatesInEventLoop() = 0;
|
|
33
35
|
virtual bool enableSpannableBuildingUnification() = 0;
|
|
34
36
|
virtual bool enableCustomDrawOrderFabric() = 0;
|
|
35
37
|
virtual bool enableFixForClippedSubviewsCrash() = 0;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<6d0bae7c1b0d126e58c8b9bdeaf9247e>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -40,6 +40,21 @@ bool NativeReactNativeFeatureFlags::commonTestFlag(
|
|
|
40
40
|
return ReactNativeFeatureFlags::commonTestFlag();
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
bool NativeReactNativeFeatureFlags::androidEnablePendingFabricTransactions(
|
|
44
|
+
jsi::Runtime& /*runtime*/) {
|
|
45
|
+
return ReactNativeFeatureFlags::androidEnablePendingFabricTransactions();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
bool NativeReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop(
|
|
49
|
+
jsi::Runtime& /*runtime*/) {
|
|
50
|
+
return ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
bool NativeReactNativeFeatureFlags::destroyFabricSurfacesInReactInstanceManager(
|
|
54
|
+
jsi::Runtime& /*runtime*/) {
|
|
55
|
+
return ReactNativeFeatureFlags::destroyFabricSurfacesInReactInstanceManager();
|
|
56
|
+
}
|
|
57
|
+
|
|
43
58
|
bool NativeReactNativeFeatureFlags::enableBackgroundExecutor(
|
|
44
59
|
jsi::Runtime& /*runtime*/) {
|
|
45
60
|
return ReactNativeFeatureFlags::enableBackgroundExecutor();
|
|
@@ -55,11 +70,6 @@ bool NativeReactNativeFeatureFlags::enableMicrotasks(
|
|
|
55
70
|
return ReactNativeFeatureFlags::enableMicrotasks();
|
|
56
71
|
}
|
|
57
72
|
|
|
58
|
-
bool NativeReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop(
|
|
59
|
-
jsi::Runtime& /*runtime*/) {
|
|
60
|
-
return ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
73
|
bool NativeReactNativeFeatureFlags::enableSpannableBuildingUnification(
|
|
64
74
|
jsi::Runtime& /*runtime*/) {
|
|
65
75
|
return ReactNativeFeatureFlags::enableSpannableBuildingUnification();
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<a62e65429512894e2d7c6ea696cebcba>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -32,14 +32,18 @@ class NativeReactNativeFeatureFlags
|
|
|
32
32
|
|
|
33
33
|
bool commonTestFlag(jsi::Runtime& runtime);
|
|
34
34
|
|
|
35
|
+
bool androidEnablePendingFabricTransactions(jsi::Runtime& runtime);
|
|
36
|
+
|
|
37
|
+
bool batchRenderingUpdatesInEventLoop(jsi::Runtime& runtime);
|
|
38
|
+
|
|
39
|
+
bool destroyFabricSurfacesInReactInstanceManager(jsi::Runtime& runtime);
|
|
40
|
+
|
|
35
41
|
bool enableBackgroundExecutor(jsi::Runtime& runtime);
|
|
36
42
|
|
|
37
43
|
bool useModernRuntimeScheduler(jsi::Runtime& runtime);
|
|
38
44
|
|
|
39
45
|
bool enableMicrotasks(jsi::Runtime& runtime);
|
|
40
46
|
|
|
41
|
-
bool batchRenderingUpdatesInEventLoop(jsi::Runtime& runtime);
|
|
42
|
-
|
|
43
47
|
bool enableSpannableBuildingUnification(jsi::Runtime& runtime);
|
|
44
48
|
|
|
45
49
|
bool enableCustomDrawOrderFabric(jsi::Runtime& runtime);
|