mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove ReactFeatureFlags.enableSpannableCache
Summary: This diff removes the feature flag ReactFeatureFlags.enableSpannableCache and it's already disabled MC changelog: [internal] internal Reviewed By: javache Differential Revision: D39449840 fbshipit-source-id: 69a514b611c1179f2160a1bfd4c4199538738448
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6f92a05c10
commit
4d74b4ae61
@@ -103,9 +103,6 @@ public class ReactFeatureFlags {
|
||||
*/
|
||||
public static boolean enableLargeTextMeasureCache = true;
|
||||
|
||||
/** TODO: T113245006 Delete this flag. Enables caching of spannables for text */
|
||||
public static boolean enableSpannableCache = false;
|
||||
|
||||
public static boolean dispatchPointerEvents = false;
|
||||
|
||||
/** Feature Flag to enable the pending event queue in fabric before mounting views */
|
||||
|
||||
@@ -31,7 +31,6 @@ import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.bridge.ReadableNativeMap;
|
||||
import com.facebook.react.bridge.WritableArray;
|
||||
import com.facebook.react.common.build.ReactBuildConfig;
|
||||
import com.facebook.react.config.ReactFeatureFlags;
|
||||
import com.facebook.react.uimanager.PixelUtil;
|
||||
import com.facebook.react.uimanager.ReactStylesDiffMap;
|
||||
import com.facebook.react.uimanager.ViewProps;
|
||||
@@ -193,30 +192,8 @@ public class TextLayoutManager {
|
||||
ReadableMap attributedString,
|
||||
@Nullable ReactTextViewManagerCallback reactTextViewManagerCallback) {
|
||||
|
||||
Spannable preparedSpannableText;
|
||||
|
||||
if (ReactFeatureFlags.enableSpannableCache) {
|
||||
synchronized (sSpannableCacheLock) {
|
||||
preparedSpannableText = sSpannableCache.get((ReadableNativeMap) attributedString);
|
||||
if (preparedSpannableText != null) {
|
||||
return preparedSpannableText;
|
||||
}
|
||||
}
|
||||
|
||||
preparedSpannableText =
|
||||
createSpannableFromAttributedString(
|
||||
context, attributedString, reactTextViewManagerCallback);
|
||||
|
||||
synchronized (sSpannableCacheLock) {
|
||||
sSpannableCache.put((ReadableNativeMap) attributedString, preparedSpannableText);
|
||||
}
|
||||
} else {
|
||||
preparedSpannableText =
|
||||
createSpannableFromAttributedString(
|
||||
context, attributedString, reactTextViewManagerCallback);
|
||||
}
|
||||
|
||||
return preparedSpannableText;
|
||||
return createSpannableFromAttributedString(
|
||||
context, attributedString, reactTextViewManagerCallback);
|
||||
}
|
||||
|
||||
private static Spannable createSpannableFromAttributedString(
|
||||
|
||||
+2
-25
@@ -29,7 +29,6 @@ import com.facebook.react.bridge.ReactSoftExceptionLogger;
|
||||
import com.facebook.react.bridge.WritableArray;
|
||||
import com.facebook.react.common.build.ReactBuildConfig;
|
||||
import com.facebook.react.common.mapbuffer.MapBuffer;
|
||||
import com.facebook.react.config.ReactFeatureFlags;
|
||||
import com.facebook.react.uimanager.PixelUtil;
|
||||
import com.facebook.yoga.YogaConstants;
|
||||
import com.facebook.yoga.YogaMeasureMode;
|
||||
@@ -209,30 +208,8 @@ public class TextLayoutManagerMapBuffer {
|
||||
MapBuffer attributedString,
|
||||
@Nullable ReactTextViewManagerCallback reactTextViewManagerCallback) {
|
||||
|
||||
Spannable preparedSpannableText;
|
||||
|
||||
if (ReactFeatureFlags.enableSpannableCache) {
|
||||
synchronized (sSpannableCacheLock) {
|
||||
preparedSpannableText = sSpannableCache.get(attributedString);
|
||||
if (preparedSpannableText != null) {
|
||||
return preparedSpannableText;
|
||||
}
|
||||
}
|
||||
|
||||
preparedSpannableText =
|
||||
createSpannableFromAttributedString(
|
||||
context, attributedString, reactTextViewManagerCallback);
|
||||
|
||||
synchronized (sSpannableCacheLock) {
|
||||
sSpannableCache.put(attributedString, preparedSpannableText);
|
||||
}
|
||||
} else {
|
||||
preparedSpannableText =
|
||||
createSpannableFromAttributedString(
|
||||
context, attributedString, reactTextViewManagerCallback);
|
||||
}
|
||||
|
||||
return preparedSpannableText;
|
||||
return createSpannableFromAttributedString(
|
||||
context, attributedString, reactTextViewManagerCallback);
|
||||
}
|
||||
|
||||
private static Spannable createSpannableFromAttributedString(
|
||||
|
||||
Reference in New Issue
Block a user