From eea769461194c4e86e232e1318a584b9221b0356 Mon Sep 17 00:00:00 2001 From: Nick Lefever Date: Tue, 1 Dec 2026 09:45:29 -0800 Subject: [PATCH] Remove `disableImageViewPreallocationAndroid` check from view preallocation Summary: The `disableImageViewPreallocationAndroid` experiment is over and the flag resolves to its default (`false`) everywhere. Remove its read from `FabricUIManagerBinding::schedulerDidRequestPreliminaryViewAllocation`, keeping the default behavior: `Image` views are preallocated like any other view (unless `disableViewPreallocationAndroid` is set). The `` include and literal namespace that only this check used are removed too. The flag definition itself is removed in the next diff of this stack. Changelog: [Internal] Differential Revision: D135368129 --- .../src/main/jni/react/fabric/FabricUIManagerBinding.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp index 8cff9f825b58..481f3d043632 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp @@ -31,7 +31,6 @@ #include #include #include -#include namespace facebook::react { @@ -790,17 +789,10 @@ void FabricUIManagerBinding::mergeReactRevision(SurfaceId surfaceId) { void FabricUIManagerBinding::schedulerDidRequestPreliminaryViewAllocation( const ShadowNode& shadowNode) { - using namespace std::literals::string_view_literals; - if (ReactNativeFeatureFlags::disableViewPreallocationAndroid()) { return; } - if (ReactNativeFeatureFlags::disableImageViewPreallocationAndroid() && - std::string_view(shadowNode.getComponentName()) == "Image"sv) { - return; - } - auto mountingManager = getMountingManager("preallocateView"); if (!mountingManager) { return;