From daa12dc6d20fdf92eaff91a0cef4139c2a2396e8 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Fri, 28 Apr 2023 05:30:16 -0700 Subject: [PATCH] Remove cppViewMutation support from FabricMountingManager (#37122) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37122 These are not used anymore. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D45314294 fbshipit-source-id: e4b93e0ebc9ed824ed975ad8486f8f0395605275 --- .../main/jni/react/fabric/FabricMountingManager.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp index 0b1d3acb99c..cde2d633044 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp @@ -118,8 +118,7 @@ static inline void computeBufferSizes( std::vector &cppUpdatePaddingMountItems, std::vector &cppUpdateLayoutMountItems, std::vector &cppUpdateOverflowInsetMountItems, - std::vector &cppUpdateEventEmitterMountItems, - ShadowViewMutationList &cppViewMutations) { + std::vector &cppUpdateEventEmitterMountItems) { CppMountItem::Type lastType = CppMountItem::Type::Undefined; int numSameType = 0; for (auto const &mountItem : cppCommonMountItems) { @@ -178,11 +177,6 @@ static inline void computeBufferSizes( cppDeleteMountItems.size(), batchMountItemIntsSize, batchMountItemObjectsSize); - - if (cppViewMutations.size() > 0) { - batchMountItemIntsSize++; - batchMountItemObjectsSize++; - } } static inline void writeIntBufferTypePreamble( @@ -278,7 +272,7 @@ void FabricMountingManager::executeMount( std::vector cppUpdateLayoutMountItems; std::vector cppUpdateOverflowInsetMountItems; std::vector cppUpdateEventEmitterMountItems; - auto cppViewMutations = ShadowViewMutationList(); + { std::lock_guard allocatedViewsLock(allocatedViewsMutex_); @@ -497,8 +491,7 @@ void FabricMountingManager::executeMount( cppUpdatePaddingMountItems, cppUpdateLayoutMountItems, cppUpdateOverflowInsetMountItems, - cppUpdateEventEmitterMountItems, - cppViewMutations); + cppUpdateEventEmitterMountItems); static auto createMountItemsIntBufferBatchContainer = JFabricUIManager::javaClassStatic()