Remove logical adjustments from FlatViewGroup.
Summary: These were needed until recent changes in DrawView. Reviewed By: ahmedre Differential Revision: D3646707
This commit is contained in:
parent
dfc815cb19
commit
28654aef65
|
@ -38,7 +38,8 @@ import android.graphics.RectF;
|
|||
|
||||
// These should only ever be set from within the DrawView, their only purpose is to prevent
|
||||
// excessive rounding on the UI thread in FlatViewGroup, and they are left package protected to
|
||||
// speed up direct access.
|
||||
// speed up direct access. For overflow visible, these are the adjusted bounds while taking
|
||||
// overflowing elements into account.
|
||||
/* package */ int mLogicalLeft;
|
||||
/* package */ int mLogicalTop;
|
||||
/* package */ int mLogicalRight;
|
||||
|
|
|
@ -69,11 +69,10 @@ import com.facebook.react.uimanager.ViewManagerRegistry;
|
|||
int reactTag,
|
||||
@Nullable DrawCommand[] drawCommands,
|
||||
@Nullable AttachDetachListener[] listeners,
|
||||
@Nullable NodeRegion[] nodeRegions,
|
||||
Rect logicalAdjustment) {
|
||||
@Nullable NodeRegion[] nodeRegions) {
|
||||
FlatViewGroup view = (FlatViewGroup) resolveView(reactTag);
|
||||
if (drawCommands != null) {
|
||||
view.mountDrawCommands(drawCommands, logicalAdjustment);
|
||||
view.mountDrawCommands(drawCommands);
|
||||
}
|
||||
if (listeners != null) {
|
||||
view.mountAttachDetachListeners(listeners);
|
||||
|
|
|
@ -397,10 +397,6 @@ import com.facebook.react.views.view.ReactClippingViewGroupHelper;
|
|||
}
|
||||
}
|
||||
|
||||
/* package */ final Rect getLogicalOffset() {
|
||||
return mLogicalOffset;
|
||||
}
|
||||
|
||||
/* package */ void updateNodeRegion(
|
||||
float left,
|
||||
float top,
|
||||
|
|
|
@ -51,19 +51,16 @@ import com.facebook.react.uimanager.UIViewOperationQueue;
|
|||
private final @Nullable DrawCommand[] mDrawCommands;
|
||||
private final @Nullable AttachDetachListener[] mAttachDetachListeners;
|
||||
private final @Nullable NodeRegion[] mNodeRegions;
|
||||
private final Rect mLogicalAdjustment;
|
||||
|
||||
private UpdateMountState(
|
||||
int reactTag,
|
||||
@Nullable DrawCommand[] drawCommands,
|
||||
@Nullable AttachDetachListener[] listeners,
|
||||
@Nullable NodeRegion[] nodeRegions,
|
||||
Rect logicalAdjustment) {
|
||||
@Nullable NodeRegion[] nodeRegions) {
|
||||
mReactTag = reactTag;
|
||||
mDrawCommands = drawCommands;
|
||||
mAttachDetachListeners = listeners;
|
||||
mNodeRegions = nodeRegions;
|
||||
mLogicalAdjustment = logicalAdjustment;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -72,8 +69,7 @@ import com.facebook.react.uimanager.UIViewOperationQueue;
|
|||
mReactTag,
|
||||
mDrawCommands,
|
||||
mAttachDetachListeners,
|
||||
mNodeRegions,
|
||||
mLogicalAdjustment);
|
||||
mNodeRegions);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -355,14 +351,12 @@ import com.facebook.react.uimanager.UIViewOperationQueue;
|
|||
int reactTag,
|
||||
@Nullable DrawCommand[] drawCommands,
|
||||
@Nullable AttachDetachListener[] listeners,
|
||||
@Nullable NodeRegion[] nodeRegions,
|
||||
Rect logicalOffset) {
|
||||
@Nullable NodeRegion[] nodeRegions) {
|
||||
enqueueUIOperation(new UpdateMountState(
|
||||
reactTag,
|
||||
drawCommands,
|
||||
listeners,
|
||||
nodeRegions,
|
||||
logicalOffset));
|
||||
nodeRegions));
|
||||
}
|
||||
|
||||
public void enqueueUpdateViewGroup(int reactTag, int[] viewsToAdd, int[] viewsToDetach) {
|
||||
|
|
|
@ -108,10 +108,6 @@ import com.facebook.react.views.view.ReactClippingViewGroup;
|
|||
private static final ArrayList<View> EMPTY_DETACHED_VIEWS = new ArrayList<>(0);
|
||||
private @Nullable DrawCommandManager mDrawCommandManager;
|
||||
|
||||
// for overflow visible, these adjustments are what we can apply to know the actual bounds of
|
||||
// a ViewGroup while taking overflowing elements into account.
|
||||
/* package */ Rect mLogicalAdjustments = EMPTY_RECT;
|
||||
|
||||
/* package */ FlatViewGroup(Context context) {
|
||||
super(context);
|
||||
setClipChildren(false);
|
||||
|
@ -568,8 +564,7 @@ import com.facebook.react.views.view.ReactClippingViewGroup;
|
|||
++mDrawChildIndex;
|
||||
}
|
||||
|
||||
/* package */ void mountDrawCommands(DrawCommand[] drawCommands, Rect logicalAdjustments) {
|
||||
mLogicalAdjustments = logicalAdjustments;
|
||||
/* package */ void mountDrawCommands(DrawCommand[] drawCommands) {
|
||||
if (mDrawCommandManager != null) {
|
||||
mDrawCommandManager.mountDrawCommands(drawCommands);
|
||||
} else {
|
||||
|
|
|
@ -334,8 +334,7 @@ import com.facebook.react.uimanager.events.EventDispatcher;
|
|||
node.getReactTag(),
|
||||
drawCommands,
|
||||
listeners,
|
||||
nodeRegions,
|
||||
node.getLogicalOffset());
|
||||
nodeRegions);
|
||||
}
|
||||
|
||||
if (node.hasUnseenUpdates()) {
|
||||
|
|
Loading…
Reference in New Issue