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:
Seth Kirby 2016-08-01 13:06:42 -07:00 коммит произвёл Ahmed El-Helw
Родитель dfc815cb19
Коммит 28654aef65
6 изменённых файлов: 10 добавлений и 26 удалений

Просмотреть файл

@ -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()) {