Skip to content

Commit 4e7b19a

Browse files
mdvaccameta-codesync[bot]
authored andcommitted
Delete NativeViewHierarchyOptimizer (facebook#55657)
Summary: Pull Request resolved: facebook#55657 Remove the NativeViewHierarchyOptimizer class and all its usages. This class was part of the Legacy Architecture and had already been largely gutted (most logic removed due to NativeKind removal). Its remaining responsibilities have been inlined into the call sites: UIImplementation now directly enqueues view operations on UIViewOperationQueue, and ReactShadowNodeImpl.dispatchUpdates now directly calls enqueueUpdateLayout. The NativeViewHierarchyOptimizer parameter has been removed from the ReactShadowNode.onBeforeLayout() and dispatchUpdates() interfaces. changelog: [internal] internal Reviewed By: NickGerleman Differential Revision: D93037023 fbshipit-source-id: ba76730ada6bd5ceeea31dcf28eb3f6a690b439f
1 parent 9fdaac3 commit 4e7b19a

6 files changed

Lines changed: 49 additions & 469 deletions

File tree

packages/react-native/ReactAndroid/api/ReactAndroid.api

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3539,19 +3539,6 @@ public class com/facebook/react/uimanager/NativeViewHierarchyManager {
35393539
public fun updateViewExtraData (ILjava/lang/Object;)V
35403540
}
35413541

3542-
public class com/facebook/react/uimanager/NativeViewHierarchyOptimizer {
3543-
public fun <init> (Lcom/facebook/react/uimanager/UIViewOperationQueue;Lcom/facebook/react/uimanager/ShadowNodeRegistry;)V
3544-
public static fun assertNodeSupportedWithoutOptimizer (Lcom/facebook/react/uimanager/ReactShadowNode;)V
3545-
public fun handleCreateView (Lcom/facebook/react/uimanager/ReactShadowNode;Lcom/facebook/react/uimanager/ThemedReactContext;Lcom/facebook/react/uimanager/ReactStylesDiffMap;)V
3546-
public fun handleForceViewToBeNonLayoutOnly (Lcom/facebook/react/uimanager/ReactShadowNode;)V
3547-
public fun handleManageChildren (Lcom/facebook/react/uimanager/ReactShadowNode;[I[I[Lcom/facebook/react/uimanager/ViewAtIndex;[I)V
3548-
public static fun handleRemoveNode (Lcom/facebook/react/uimanager/ReactShadowNode;)V
3549-
public fun handleSetChildren (Lcom/facebook/react/uimanager/ReactShadowNode;Lcom/facebook/react/bridge/ReadableArray;)V
3550-
public fun handleUpdateLayout (Lcom/facebook/react/uimanager/ReactShadowNode;)V
3551-
public fun handleUpdateView (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Lcom/facebook/react/uimanager/ReactStylesDiffMap;)V
3552-
public fun onBatchComplete ()V
3553-
}
3554-
35553542
public final class com/facebook/react/uimanager/OnLayoutEvent : com/facebook/react/uimanager/events/Event {
35563543
public static final field Companion Lcom/facebook/react/uimanager/OnLayoutEvent$Companion;
35573544
public fun getEventName ()Ljava/lang/String;
@@ -3852,7 +3839,7 @@ public abstract interface class com/facebook/react/uimanager/ReactShadowNode {
38523839
public abstract fun calculateLayout (FF)V
38533840
public abstract fun calculateLayoutOnChildren ()Ljava/lang/Iterable;
38543841
public abstract fun dirty ()V
3855-
public abstract fun dispatchUpdates (FFLcom/facebook/react/uimanager/UIViewOperationQueue;Lcom/facebook/react/uimanager/NativeViewHierarchyOptimizer;)V
3842+
public abstract fun dispatchUpdates (FFLcom/facebook/react/uimanager/UIViewOperationQueue;)V
38563843
public abstract fun dispatchUpdatesWillChangeLayout (FF)Z
38573844
public abstract fun dispose ()V
38583845
public abstract fun getChildAt (I)Lcom/facebook/react/uimanager/ReactShadowNode;
@@ -3901,7 +3888,7 @@ public abstract interface class com/facebook/react/uimanager/ReactShadowNode {
39013888
public abstract fun markUpdateSeen ()V
39023889
public abstract fun markUpdated ()V
39033890
public abstract fun onAfterUpdateTransaction ()V
3904-
public abstract fun onBeforeLayout (Lcom/facebook/react/uimanager/NativeViewHierarchyOptimizer;)V
3891+
public abstract fun onBeforeLayout ()V
39053892
public abstract fun onCollectExtraUpdates (Lcom/facebook/react/uimanager/UIViewOperationQueue;)V
39063893
public abstract fun removeAllNativeChildren ()V
39073894
public abstract fun removeAndDisposeAllChildren ()V
@@ -3978,7 +3965,7 @@ public class com/facebook/react/uimanager/ReactShadowNodeImpl : com/facebook/rea
39783965
public fun calculateLayout (FF)V
39793966
public fun calculateLayoutOnChildren ()Ljava/lang/Iterable;
39803967
public fun dirty ()V
3981-
public fun dispatchUpdates (FFLcom/facebook/react/uimanager/UIViewOperationQueue;Lcom/facebook/react/uimanager/NativeViewHierarchyOptimizer;)V
3968+
public fun dispatchUpdates (FFLcom/facebook/react/uimanager/UIViewOperationQueue;)V
39823969
public fun dispatchUpdatesWillChangeLayout (FF)Z
39833970
public fun dispose ()V
39843971
public synthetic fun getChildAt (I)Lcom/facebook/react/uimanager/ReactShadowNode;
@@ -4035,7 +4022,7 @@ public class com/facebook/react/uimanager/ReactShadowNodeImpl : com/facebook/rea
40354022
public final fun markUpdateSeen ()V
40364023
public fun markUpdated ()V
40374024
public fun onAfterUpdateTransaction ()V
4038-
public fun onBeforeLayout (Lcom/facebook/react/uimanager/NativeViewHierarchyOptimizer;)V
4025+
public fun onBeforeLayout ()V
40394026
public fun onCollectExtraUpdates (Lcom/facebook/react/uimanager/UIViewOperationQueue;)V
40404027
public final fun removeAllNativeChildren ()V
40414028
public fun removeAndDisposeAllChildren ()V

0 commit comments

Comments
 (0)