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<<8443301e7625595b6ca21901da0ccb88>>
* @generated SignedSource<<a3987ccb2790e770ecf2f5235f4251c8>>
*/

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

/**
* When enabled, ParagraphShadowNode will no longer call measure twice.
*/
@JvmStatic
public fun preventDoubleTextMeasure(): Boolean = accessor.preventDoubleTextMeasure()

/**
* Propagate layout direction to Android views.
*/
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<<27c99bbe01b2b8999c6fa44be28f62d3>>
* @generated SignedSource<<b9d33f024db44c5763643040d126427a>>
*/

/**
Expand Down Expand Up @@ -40,7 +40,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
private var fuseboxEnabledDebugCache: Boolean? = null
private var fuseboxEnabledReleaseCache: Boolean? = null
private var lazyAnimationCallbacksCache: Boolean? = null
private var preventDoubleTextMeasureCache: Boolean? = null
private var setAndroidLayoutDirectionCache: Boolean? = null
private var useImmediateExecutorInAndroidBridgelessCache: Boolean? = null
private var useModernRuntimeSchedulerCache: Boolean? = null
Expand Down Expand Up @@ -229,15 +228,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
return cached
}

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

override fun setAndroidLayoutDirection(): Boolean {
var cached = setAndroidLayoutDirectionCache
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<<2602dcd923a97419bfc2086d59ef9e90>>
* @generated SignedSource<<f249a07119afbcc3ea683cdfc0ad2f4d>>
*/

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

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

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

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

@DoNotStrip @JvmStatic public external fun useImmediateExecutorInAndroidBridgeless(): 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<<a05b272a8a6ad7eced30f680e73bd9be>>
* @generated SignedSource<<1d1be40242f4d5d9d62178b3e74d9762>>
*/

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

override fun lazyAnimationCallbacks(): Boolean = false

override fun preventDoubleTextMeasure(): Boolean = true

override fun setAndroidLayoutDirection(): Boolean = true

override fun useImmediateExecutorInAndroidBridgeless(): 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<<ffcb3d17adea4a1b95421862210665df>>
* @generated SignedSource<<2e04f3f7b9a16bdbb41eb7d916f992f3>>
*/

/**
Expand Down Expand Up @@ -44,7 +44,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
private var fuseboxEnabledDebugCache: Boolean? = null
private var fuseboxEnabledReleaseCache: Boolean? = null
private var lazyAnimationCallbacksCache: Boolean? = null
private var preventDoubleTextMeasureCache: Boolean? = null
private var setAndroidLayoutDirectionCache: Boolean? = null
private var useImmediateExecutorInAndroidBridgelessCache: Boolean? = null
private var useModernRuntimeSchedulerCache: Boolean? = null
Expand Down Expand Up @@ -253,16 +252,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun setAndroidLayoutDirection(): Boolean {
var cached = setAndroidLayoutDirectionCache
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<<1b1165f9b93f140f5e01561ec6e16be2>>
* @generated SignedSource<<f75e4e04ca45e5990611f852399f221f>>
*/

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

@DoNotStrip public fun lazyAnimationCallbacks(): Boolean

@DoNotStrip public fun preventDoubleTextMeasure(): Boolean

@DoNotStrip public fun setAndroidLayoutDirection(): Boolean

@DoNotStrip public fun useImmediateExecutorInAndroidBridgeless(): 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<<3cb2d3e59dadfa27214c024780a664df>>
* @generated SignedSource<<1d5ca540f22b37e5da47d568c85a3516>>
*/

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

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

bool setAndroidLayoutDirection() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("setAndroidLayoutDirection");
Expand Down Expand Up @@ -311,11 +305,6 @@ bool JReactNativeFeatureFlagsCxxInterop::lazyAnimationCallbacks(
return ReactNativeFeatureFlags::lazyAnimationCallbacks();
}

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

bool JReactNativeFeatureFlagsCxxInterop::setAndroidLayoutDirection(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::setAndroidLayoutDirection();
Expand Down Expand Up @@ -428,9 +417,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"lazyAnimationCallbacks",
JReactNativeFeatureFlagsCxxInterop::lazyAnimationCallbacks),
makeNativeMethod(
"preventDoubleTextMeasure",
JReactNativeFeatureFlagsCxxInterop::preventDoubleTextMeasure),
makeNativeMethod(
"setAndroidLayoutDirection",
JReactNativeFeatureFlagsCxxInterop::setAndroidLayoutDirection),
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<<9e3b9014578cec97635c2bd8d3c7add3>>
* @generated SignedSource<<5b06af58b7d72737b77afe7df6582eee>>
*/

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

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

static bool setAndroidLayoutDirection(
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<<08c9a03b2c6960cc548c41a126073300>>
* @generated SignedSource<<41d71b9ee1e7cbd86642f8ae9ece251e>>
*/

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

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

bool ReactNativeFeatureFlags::setAndroidLayoutDirection() {
return getAccessor().setAndroidLayoutDirection();
}
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<<8f367ce041b58945348d0f0648adeca3>>
* @generated SignedSource<<5fd10fd80549413ca032910f3cbf9394>>
*/

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

/**
* When enabled, ParagraphShadowNode will no longer call measure twice.
*/
RN_EXPORT static bool preventDoubleTextMeasure();

/**
* Propagate layout direction to Android views.
*/
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<<4cf3feaf98ef3509008232e50829daca>>
* @generated SignedSource<<e761843bd0f6f033d88b79e4487051b9>>
*/

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

bool ReactNativeFeatureFlagsAccessor::preventDoubleTextMeasure() {
auto flagValue = preventDoubleTextMeasure_.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(20, "preventDoubleTextMeasure");

flagValue = currentProvider_->preventDoubleTextMeasure();
preventDoubleTextMeasure_ = flagValue;
}

return flagValue.value();
}

bool ReactNativeFeatureFlagsAccessor::setAndroidLayoutDirection() {
auto flagValue = setAndroidLayoutDirection_.load();

Expand All @@ -416,7 +398,7 @@ bool ReactNativeFeatureFlagsAccessor::setAndroidLayoutDirection() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(21, "setAndroidLayoutDirection");
markFlagAsAccessed(20, "setAndroidLayoutDirection");

flagValue = currentProvider_->setAndroidLayoutDirection();
setAndroidLayoutDirection_ = flagValue;
Expand All @@ -434,7 +416,7 @@ bool ReactNativeFeatureFlagsAccessor::useImmediateExecutorInAndroidBridgeless()
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(22, "useImmediateExecutorInAndroidBridgeless");
markFlagAsAccessed(21, "useImmediateExecutorInAndroidBridgeless");

flagValue = currentProvider_->useImmediateExecutorInAndroidBridgeless();
useImmediateExecutorInAndroidBridgeless_ = flagValue;
Expand All @@ -452,7 +434,7 @@ bool ReactNativeFeatureFlagsAccessor::useModernRuntimeScheduler() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(23, "useModernRuntimeScheduler");
markFlagAsAccessed(22, "useModernRuntimeScheduler");

flagValue = currentProvider_->useModernRuntimeScheduler();
useModernRuntimeScheduler_ = flagValue;
Expand All @@ -470,7 +452,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(24, "useNativeViewConfigsInBridgelessMode");
markFlagAsAccessed(23, "useNativeViewConfigsInBridgelessMode");

flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
useNativeViewConfigsInBridgelessMode_ = flagValue;
Expand All @@ -488,7 +470,7 @@ bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdate() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(25, "useRuntimeShadowNodeReferenceUpdate");
markFlagAsAccessed(24, "useRuntimeShadowNodeReferenceUpdate");

flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdate();
useRuntimeShadowNodeReferenceUpdate_ = flagValue;
Expand All @@ -506,7 +488,7 @@ bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdateOnLayou
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(26, "useRuntimeShadowNodeReferenceUpdateOnLayout");
markFlagAsAccessed(25, "useRuntimeShadowNodeReferenceUpdateOnLayout");

flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdateOnLayout();
useRuntimeShadowNodeReferenceUpdateOnLayout_ = flagValue;
Expand All @@ -524,7 +506,7 @@ bool ReactNativeFeatureFlagsAccessor::useStateAlignmentMechanism() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(27, "useStateAlignmentMechanism");
markFlagAsAccessed(26, "useStateAlignmentMechanism");

flagValue = currentProvider_->useStateAlignmentMechanism();
useStateAlignmentMechanism_ = 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<<6e1d8221c96bcf5ac6ac2e2a5ac673f1>>
* @generated SignedSource<<9576ea08627816c24c66ca8a7a75853f>>
*/

/**
Expand Down Expand Up @@ -51,7 +51,6 @@ class ReactNativeFeatureFlagsAccessor {
bool fuseboxEnabledDebug();
bool fuseboxEnabledRelease();
bool lazyAnimationCallbacks();
bool preventDoubleTextMeasure();
bool setAndroidLayoutDirection();
bool useImmediateExecutorInAndroidBridgeless();
bool useModernRuntimeScheduler();
Expand All @@ -69,7 +68,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;

std::array<std::atomic<const char*>, 28> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 27> accessedFeatureFlags_;

std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> allowCollapsableChildren_;
Expand All @@ -91,7 +90,6 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> fuseboxEnabledDebug_;
std::atomic<std::optional<bool>> fuseboxEnabledRelease_;
std::atomic<std::optional<bool>> lazyAnimationCallbacks_;
std::atomic<std::optional<bool>> preventDoubleTextMeasure_;
std::atomic<std::optional<bool>> setAndroidLayoutDirection_;
std::atomic<std::optional<bool>> useImmediateExecutorInAndroidBridgeless_;
std::atomic<std::optional<bool>> useModernRuntimeScheduler_;
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<<77188afc2fdd7ef693abfd5e02354efc>>
* @generated SignedSource<<a781613b0452bd8407db9fbe3393f0f6>>
*/

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

bool preventDoubleTextMeasure() override {
return true;
}

bool setAndroidLayoutDirection() override {
return true;
}
Expand Down
Loading