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,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<<56c989556810840e2dd2a42b66d431dc>>
* @generated SignedSource<<6435f36d035c9e6156ca406c52c32f97>>
*/

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

/**
* Use std::unordered_map instead of TinyMap in the Differentiator for improved lookup performance.
*/
@JvmStatic
public fun useUnorderedMapInDifferentiator(): Boolean = accessor.useUnorderedMapInDifferentiator()

/**
* Outset the culling context frame with the provided ratio. The culling context frame size will be outset by width * ratio on the left and right, and height * ratio on the top and bottom.
*/
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<<43aa532756b07f0b754cd74eb4811664>>
* @generated SignedSource<<846ef4482c364c5bdc7a53fb5cf13b7a>>
*/

/**
Expand Down Expand Up @@ -107,7 +107,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var useTraitHiddenOnAndroidCache: Boolean? = null
private var useTurboModuleInteropCache: Boolean? = null
private var useTurboModulesCache: Boolean? = null
private var useUnorderedMapInDifferentiatorCache: Boolean? = null
private var viewCullingOutsetRatioCache: Double? = null
private var viewTransitionEnabledCache: Boolean? = null
private var viewTransitionUseHardwareBitmapAndroidCache: Boolean? = null
Expand Down Expand Up @@ -896,15 +895,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun viewCullingOutsetRatio(): Double {
var cached = viewCullingOutsetRatioCache
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<<5cb98793989e603846a2008aa1a6af41>>
* @generated SignedSource<<220fb16555e971c9044e337490a9666f>>
*/

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

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

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

@DoNotStrip @JvmStatic public external fun viewCullingOutsetRatio(): Double

@DoNotStrip @JvmStatic public external fun viewTransitionEnabled(): 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<<f4b6d9ed2f6ccff6ab01e53f6048423c>>
* @generated SignedSource<<78f2c235e31f57bc005e50215014fb36>>
*/

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

override fun useTurboModules(): Boolean = false

override fun useUnorderedMapInDifferentiator(): Boolean = false

override fun viewCullingOutsetRatio(): Double = 0.0

override fun viewTransitionEnabled(): 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<<6ee1cc911c3ebb12b31151441dd43605>>
* @generated SignedSource<<6bb61ed8b333abcfd38da1c2ef19f421>>
*/

/**
Expand Down Expand Up @@ -111,7 +111,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var useTraitHiddenOnAndroidCache: Boolean? = null
private var useTurboModuleInteropCache: Boolean? = null
private var useTurboModulesCache: Boolean? = null
private var useUnorderedMapInDifferentiatorCache: Boolean? = null
private var viewCullingOutsetRatioCache: Double? = null
private var viewTransitionEnabledCache: Boolean? = null
private var viewTransitionUseHardwareBitmapAndroidCache: Boolean? = null
Expand Down Expand Up @@ -987,16 +986,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

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

override fun viewCullingOutsetRatio(): Double {
var cached = viewCullingOutsetRatioCache
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<<9945400608426bf3aa1163b9f212d07c>>
* @generated SignedSource<<af3130efca40b595fbb0aa0a15770a05>>
*/

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

@DoNotStrip public fun useTurboModules(): Boolean

@DoNotStrip public fun useUnorderedMapInDifferentiator(): Boolean

@DoNotStrip public fun viewCullingOutsetRatio(): Double

@DoNotStrip public fun viewTransitionEnabled(): 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<<50f384f98360c4fc9d16d7c25b82aec6>>
* @generated SignedSource<<3194d64185f009102ffc2f218451b912>>
*/

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

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

double viewCullingOutsetRatio() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jdouble()>("viewCullingOutsetRatio");
Expand Down Expand Up @@ -1030,11 +1024,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useTurboModules(
return ReactNativeFeatureFlags::useTurboModules();
}

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

double JReactNativeFeatureFlagsCxxInterop::viewCullingOutsetRatio(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::viewCullingOutsetRatio();
Expand Down Expand Up @@ -1347,9 +1336,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"useTurboModules",
JReactNativeFeatureFlagsCxxInterop::useTurboModules),
makeNativeMethod(
"useUnorderedMapInDifferentiator",
JReactNativeFeatureFlagsCxxInterop::useUnorderedMapInDifferentiator),
makeNativeMethod(
"viewCullingOutsetRatio",
JReactNativeFeatureFlagsCxxInterop::viewCullingOutsetRatio),
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<<7a73667c552251d722f6c9800f53d251>>
* @generated SignedSource<<434594f8c9022e0fb028be591ac4147c>>
*/

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

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

static double viewCullingOutsetRatio(
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<<8233ac72d584e038a6c1d94bea37ea40>>
* @generated SignedSource<<6cf8cc4c41d2747fb2dabaddff723d88>>
*/

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

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

double ReactNativeFeatureFlags::viewCullingOutsetRatio() {
return getAccessor().viewCullingOutsetRatio();
}
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<<501a0efcf0a4ab20827bdefc3a844b3f>>
* @generated SignedSource<<71219a9ff75aaaf54d0041722d8f44a2>>
*/

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

/**
* Use std::unordered_map instead of TinyMap in the Differentiator for improved lookup performance.
*/
RN_EXPORT static bool useUnorderedMapInDifferentiator();

/**
* Outset the culling context frame with the provided ratio. The culling context frame size will be outset by width * ratio on the left and right, and height * ratio on the top and bottom.
*/
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<<38e1f5a2dbb854a154e96c20e701b2e4>>
* @generated SignedSource<<ec8de0e7fd0a799af284ee3663e88ab4>>
*/

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

bool ReactNativeFeatureFlagsAccessor::useUnorderedMapInDifferentiator() {
auto flagValue = useUnorderedMapInDifferentiator_.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(87, "useUnorderedMapInDifferentiator");

flagValue = currentProvider_->useUnorderedMapInDifferentiator();
useUnorderedMapInDifferentiator_ = flagValue;
}

return flagValue.value();
}

double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() {
auto flagValue = viewCullingOutsetRatio_.load();

Expand All @@ -1622,7 +1604,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(88, "viewCullingOutsetRatio");
markFlagAsAccessed(87, "viewCullingOutsetRatio");

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

markFlagAsAccessed(89, "viewTransitionEnabled");
markFlagAsAccessed(88, "viewTransitionEnabled");

flagValue = currentProvider_->viewTransitionEnabled();
viewTransitionEnabled_ = flagValue;
Expand All @@ -1658,7 +1640,7 @@ bool ReactNativeFeatureFlagsAccessor::viewTransitionUseHardwareBitmapAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(90, "viewTransitionUseHardwareBitmapAndroid");
markFlagAsAccessed(89, "viewTransitionUseHardwareBitmapAndroid");

flagValue = currentProvider_->viewTransitionUseHardwareBitmapAndroid();
viewTransitionUseHardwareBitmapAndroid_ = flagValue;
Expand All @@ -1676,7 +1658,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(91, "virtualViewPrerenderRatio");
markFlagAsAccessed(90, "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<<7ca64bcbf3e769a24efe894e994b131e>>
* @generated SignedSource<<bca7e4b933de3dfd86399156dbc195ab>>
*/

/**
Expand Down Expand Up @@ -119,7 +119,6 @@ class ReactNativeFeatureFlagsAccessor {
bool useTraitHiddenOnAndroid();
bool useTurboModuleInterop();
bool useTurboModules();
bool useUnorderedMapInDifferentiator();
double viewCullingOutsetRatio();
bool viewTransitionEnabled();
bool viewTransitionUseHardwareBitmapAndroid();
Expand All @@ -135,7 +134,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;

std::array<std::atomic<const char*>, 92> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 91> accessedFeatureFlags_;

std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
Expand Down Expand Up @@ -224,7 +223,6 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> useTraitHiddenOnAndroid_;
std::atomic<std::optional<bool>> useTurboModuleInterop_;
std::atomic<std::optional<bool>> useTurboModules_;
std::atomic<std::optional<bool>> useUnorderedMapInDifferentiator_;
std::atomic<std::optional<double>> viewCullingOutsetRatio_;
std::atomic<std::optional<bool>> viewTransitionEnabled_;
std::atomic<std::optional<bool>> viewTransitionUseHardwareBitmapAndroid_;
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<<df8c0c8c4ec5942b5855b53beb497c1f>>
* @generated SignedSource<<c5931b97542549adb6bf9dbb733368cc>>
*/

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

bool useUnorderedMapInDifferentiator() override {
return false;
}

double viewCullingOutsetRatio() override {
return 0.0;
}
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<<ec98fe64276aaaa226710fad24b27415>>
* @generated SignedSource<<eea7d8b25190b3e85622eb65d7705072>>
*/

/**
Expand Down Expand Up @@ -828,15 +828,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
return ReactNativeFeatureFlagsDefaults::useTurboModules();
}

bool useUnorderedMapInDifferentiator() override {
auto value = values_["useUnorderedMapInDifferentiator"];
if (!value.isNull()) {
return value.getBool();
}

return ReactNativeFeatureFlagsDefaults::useUnorderedMapInDifferentiator();
}

double viewCullingOutsetRatio() override {
auto value = values_["viewCullingOutsetRatio"];
if (!value.isNull()) {
Expand Down
Loading
Loading