diff --git a/packages/react-native/React/Fabric/Mounting/RCTMountingManager.mm b/packages/react-native/React/Fabric/Mounting/RCTMountingManager.mm index 9759094f885..ec4354583ac 100644 --- a/packages/react-native/React/Fabric/Mounting/RCTMountingManager.mm +++ b/packages/react-native/React/Fabric/Mounting/RCTMountingManager.mm @@ -102,11 +102,6 @@ static void RCTPerformMountInstructions( break; } - case ShadowViewMutation::RemoveDeleteTree: { - // TODO - not supported yet - break; - } - case ShadowViewMutation::Update: { auto &oldChildShadowView = mutation.oldChildShadowView; auto &newChildShadowView = mutation.newChildShadowView; 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 7a5dca8a839..c3645749abc 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 @@ -53,8 +53,6 @@ static inline int getIntBufferSizeForType(CppMountItem::Type mountItemType) { case CppMountItem::Type::Insert: case CppMountItem::Type::Remove: return 3; // tag, parentTag, index - case CppMountItem::Type::RemoveDeleteTree: - return 3; // tag, parentTag, index case CppMountItem::Type::Delete: case CppMountItem::Type::UpdateProps: case CppMountItem::Type::UpdateState: @@ -293,14 +291,6 @@ void FabricMountingManager::executeMount( } break; } - case ShadowViewMutation::RemoveDeleteTree: { - if (!isVirtual) { - cppCommonMountItems.push_back( - CppMountItem::RemoveDeleteTreeMountItem( - parentShadowView, oldChildShadowView, index)); - } - break; - } case ShadowViewMutation::Delete: { cppDeleteMountItems.push_back( CppMountItem::DeleteMountItem(oldChildShadowView)); @@ -566,12 +556,6 @@ void FabricMountingManager::executeMount( temp[2] = mountItem.index; env->SetIntArrayRegion(intBufferArray, intBufferPosition, 3, temp); intBufferPosition += 3; - } else if (mountItemType == CppMountItem::RemoveDeleteTree) { - temp[0] = mountItem.oldChildShadowView.tag; - temp[1] = mountItem.parentShadowView.tag; - temp[2] = mountItem.index; - env->SetIntArrayRegion(intBufferArray, intBufferPosition, 3, temp); - intBufferPosition += 3; } else { LOG(ERROR) << "Unexpected CppMountItem type"; } diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.cpp index b1f20f87984..dca0d109e0d 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.cpp @@ -27,13 +27,6 @@ CppMountItem CppMountItem::RemoveMountItem( int index) { return {CppMountItem::Type::Remove, parentView, shadowView, {}, index}; } -CppMountItem CppMountItem::RemoveDeleteTreeMountItem( - const ShadowView& parentView, - const ShadowView& shadowView, - int index) { - return { - CppMountItem::Type::RemoveDeleteTree, parentView, shadowView, {}, index}; -} CppMountItem CppMountItem::UpdatePropsMountItem( const ShadowView& oldShadowView, const ShadowView& newShadowView) { diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.h index d3b65a7424a..fad7b2b6e58 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.h @@ -34,11 +34,6 @@ struct CppMountItem final { const ShadowView& shadowView, int index); - static CppMountItem RemoveDeleteTreeMountItem( - const ShadowView& parentView, - const ShadowView& shadowView, - int index); - static CppMountItem UpdatePropsMountItem( const ShadowView& oldShadowView, const ShadowView& newShadowView); @@ -70,8 +65,7 @@ struct CppMountItem final { UpdateLayout = 128, UpdateEventEmitter = 256, UpdatePadding = 512, - UpdateOverflowInset = 1024, - RemoveDeleteTree = 2048 + UpdateOverflowInset = 1024 }; #pragma mark - Fields diff --git a/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp b/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp index 5684bf95bc0..bcf665fcdac 100644 --- a/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +++ b/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp @@ -291,10 +291,6 @@ LayoutAnimationKeyFrameManager::pullTransaction( std::vector keyFramesToAnimate; const auto layoutAnimationConfig = animation.layoutAnimationConfig; for (const auto& mutation : mutations) { - if (mutation.type == ShadowViewMutation::Type::RemoveDeleteTree) { - continue; - } - ShadowView baselineShadowView = (mutation.type == ShadowViewMutation::Type::Delete || mutation.type == ShadowViewMutation::Type::Remove || @@ -1191,16 +1187,6 @@ void LayoutAnimationKeyFrameManager::queueFinalMutationsForCompletedKeyFrame( mutationsList.push_back(ShadowViewMutation::RemoveMutation( finalMutation.parentShadowView, prev, finalMutation.index)); break; - case ShadowViewMutation::Type::RemoveDeleteTree: - // Note: Currently, there is a guarantee that if RemoveDeleteTree - // operations are generated, we /also/ generate corresponding - // Remove/Delete operations that are marked as "redundant". - // LayoutAnimations will process the redundant operations here, and - // ignore this mega-op. In the future for perf reasons it would be - // nice to remove the redundant operations entirely but we would need - // to find a way to make the RemoveDeleteTree operation work with - // LayoutAnimations (that might not be possible). - break; case ShadowViewMutation::Type::Update: mutationsList.push_back(ShadowViewMutation::UpdateMutation( prev, @@ -1492,10 +1478,6 @@ void LayoutAnimationKeyFrameManager::getAndEraseConflictingAnimations( std::vector& conflictingAnimations) const { ShadowViewMutationList localConflictingMutations{}; for (const auto& mutation : mutations) { - if (mutation.type == ShadowViewMutation::Type::RemoveDeleteTree) { - continue; - } - bool mutationIsCreateOrDelete = mutation.type == ShadowViewMutation::Type::Create || mutation.type == ShadowViewMutation::Type::Delete; diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowViewMutation.cpp b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowViewMutation.cpp index c64b1dff648..1c694298963 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowViewMutation.cpp +++ b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowViewMutation.cpp @@ -57,19 +57,6 @@ ShadowViewMutation ShadowViewMutation::RemoveMutation( }; } -ShadowViewMutation ShadowViewMutation::RemoveDeleteTreeMutation( - ShadowView parentShadowView, - ShadowView childShadowView, - int index) { - return { - /* .type = */ RemoveDeleteTree, - /* .parentShadowView = */ std::move(parentShadowView), - /* .oldChildShadowView = */ std::move(childShadowView), - /* .newChildShadowView = */ {}, - /* .index = */ index, - }; -} - ShadowViewMutation ShadowViewMutation::UpdateMutation( ShadowView oldChildShadowView, ShadowView newChildShadowView, @@ -125,8 +112,6 @@ std::string getDebugName(const ShadowViewMutation& mutation) { return "Remove"; case ShadowViewMutation::Update: return "Update"; - case ShadowViewMutation::RemoveDeleteTree: - return "RemoveDeleteTree"; } } diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowViewMutation.h b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowViewMutation.h index f5725fcb1b3..dc9c23ff359 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowViewMutation.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowViewMutation.h @@ -52,17 +52,6 @@ struct ShadowViewMutation final { ShadowView childShadowView, int index); - /* - * Creates and returns a `RemoveDelete` mutation. - * This is a signal to (for supported platforms) - * remove and delete an entire subtree with a single - * instruction. - */ - static ShadowViewMutation RemoveDeleteTreeMutation( - ShadowView parentShadowView, - ShadowView childShadowView, - int index); - /* * Creates and returns an `Update` mutation. */ @@ -79,7 +68,6 @@ struct ShadowViewMutation final { Insert = 4, Remove = 8, Update = 16, - RemoveDeleteTree = 32 }; #pragma mark - Fields diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/stubs/StubViewTree.cpp b/packages/react-native/ReactCommon/react/renderer/mounting/stubs/StubViewTree.cpp index 63eccf58e4d..f8e82c1dbaf 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/stubs/StubViewTree.cpp +++ b/packages/react-native/ReactCommon/react/renderer/mounting/stubs/StubViewTree.cpp @@ -205,11 +205,6 @@ void StubViewTree::mutate(const ShadowViewMutationList& mutations) { break; } - case ShadowViewMutation::RemoveDeleteTree: { - // TODO: do something here - break; - } - case ShadowViewMutation::Update: { STUB_VIEW_LOG({ LOG(ERROR) << "StubView: Update [" << mutation.newChildShadowView.tag