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<<eacf6769e8598f88fe1790149e437f3f>>
* @generated SignedSource<<99a7d3e814f4b037ed4496b6eee4f264>>
*/

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

/**
* Enables linear text rendering on Android wherever subpixel text rendering is enabled
*/
@JvmStatic
public fun enableAndroidLinearText(): Boolean = accessor.enableAndroidLinearText()

/**
* Enables various optimizations throughout the path of measuring text on Android.
*/
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<<668885665a149d50bdff92bd96a297f0>>
* @generated SignedSource<<c2f867597d97dc97c8ded5fbd258c13c>>
*/

/**
Expand Down Expand Up @@ -32,7 +32,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var disableViewPreallocationAndroidCache: Boolean? = null
private var enableAccessibilityOrderCache: Boolean? = null
private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null
private var enableAndroidLinearTextCache: Boolean? = null
private var enableAndroidTextMeasurementOptimizationsCache: Boolean? = null
private var enableBridgelessArchitectureCache: Boolean? = null
private var enableCppPropsIteratorSetterCache: Boolean? = null
Expand Down Expand Up @@ -219,15 +218,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun enableAndroidTextMeasurementOptimizations(): Boolean {
var cached = enableAndroidTextMeasurementOptimizationsCache
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<<aa4a2ab7af66d857da4318ac2e75899b>>
* @generated SignedSource<<8667d7237cea82bb5978cb19582d59c0>>
*/

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

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

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

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

@DoNotStrip @JvmStatic public external fun enableBridgelessArchitecture(): 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<<6348c0cc9285f2bac6df9986155b584f>>
* @generated SignedSource<<17abc72a4045c5695818f254be1783b5>>
*/

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

override fun enableAccumulatedUpdatesInRawPropsAndroid(): Boolean = false

override fun enableAndroidLinearText(): Boolean = true

override fun enableAndroidTextMeasurementOptimizations(): Boolean = false

override fun enableBridgelessArchitecture(): 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<<f545945b19339923fcafab4eeb1da134>>
* @generated SignedSource<<77ba6c5db120016e6e1f8af195ab3690>>
*/

/**
Expand Down Expand Up @@ -36,7 +36,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var disableViewPreallocationAndroidCache: Boolean? = null
private var enableAccessibilityOrderCache: Boolean? = null
private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null
private var enableAndroidLinearTextCache: Boolean? = null
private var enableAndroidTextMeasurementOptimizationsCache: Boolean? = null
private var enableBridgelessArchitectureCache: Boolean? = null
private var enableCppPropsIteratorSetterCache: Boolean? = null
Expand Down Expand Up @@ -235,16 +234,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

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

override fun enableAndroidTextMeasurementOptimizations(): Boolean {
var cached = enableAndroidTextMeasurementOptimizationsCache
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<<e340fe9805381dcf818f51e333f7c120>>
* @generated SignedSource<<8496c138ce5493df84149940df0de944>>
*/

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

@DoNotStrip public fun enableAccumulatedUpdatesInRawPropsAndroid(): Boolean

@DoNotStrip public fun enableAndroidLinearText(): Boolean

@DoNotStrip public fun enableAndroidTextMeasurementOptimizations(): Boolean

@DoNotStrip public fun enableBridgelessArchitecture(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import android.text.TextPaint
import android.text.style.MetricAffectingSpan
import com.facebook.react.common.ReactConstants
import com.facebook.react.common.assets.ReactFontManager
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags
import com.facebook.react.views.text.ReactTypefaceUtils

/**
Expand Down Expand Up @@ -74,9 +73,7 @@ internal class CustomStyleSpan(
fontFeatureSettings = fontFeatureSettingsParam
setTypeface(typeface)
isSubpixelText = true
if (ReactNativeFeatureFlags.enableAndroidLinearText()) {
isLinearText = true
}
isLinearText = true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,14 +621,12 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
paintFlags and Paint.SUBPIXEL_TEXT_FLAG.inv()
}

if (ReactNativeFeatureFlags.enableAndroidLinearText()) {
paintFlags =
if (enableSubpixelText) {
paintFlags or Paint.LINEAR_TEXT_FLAG
} else {
paintFlags and Paint.LINEAR_TEXT_FLAG.inv()
}
}
paintFlags =
if (enableSubpixelText) {
paintFlags or Paint.LINEAR_TEXT_FLAG
} else {
paintFlags and Paint.LINEAR_TEXT_FLAG.inv()
}
}

public fun requestFocusFromJS() {
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<<367bb35175543888c27d2e26a049289c>>
* @generated SignedSource<<5bac13bb6faeffdd3c5eca800f25b96a>>
*/

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

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

bool enableAndroidTextMeasurementOptimizations() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableAndroidTextMeasurementOptimizations");
Expand Down Expand Up @@ -643,11 +637,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableAccumulatedUpdatesInRawPropsAndro
return ReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid();
}

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

bool JReactNativeFeatureFlagsCxxInterop::enableAndroidTextMeasurementOptimizations(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableAndroidTextMeasurementOptimizations();
Expand Down Expand Up @@ -1100,9 +1089,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableAccumulatedUpdatesInRawPropsAndroid",
JReactNativeFeatureFlagsCxxInterop::enableAccumulatedUpdatesInRawPropsAndroid),
makeNativeMethod(
"enableAndroidLinearText",
JReactNativeFeatureFlagsCxxInterop::enableAndroidLinearText),
makeNativeMethod(
"enableAndroidTextMeasurementOptimizations",
JReactNativeFeatureFlagsCxxInterop::enableAndroidTextMeasurementOptimizations),
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<<e3364d03414c159bf8ad8afbd4d3fafe>>
* @generated SignedSource<<ad45dce1fafd3bd29078bd54e4206d9f>>
*/

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

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

static bool enableAndroidTextMeasurementOptimizations(
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<<252f40100280324a528cced3c2c40176>>
* @generated SignedSource<<b229243317998e64843f285f86af161c>>
*/

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

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

bool ReactNativeFeatureFlags::enableAndroidTextMeasurementOptimizations() {
return getAccessor().enableAndroidTextMeasurementOptimizations();
}
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<<a561d93b455e4092342a4fddb6143dac>>
* @generated SignedSource<<86b3267ffa68e0f68280957aa54d5041>>
*/

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

/**
* Enables linear text rendering on Android wherever subpixel text rendering is enabled
*/
RN_EXPORT static bool enableAndroidLinearText();

/**
* Enables various optimizations throughout the path of measuring text on Android.
*/
Expand Down
Loading
Loading