Add position information for DrawViews.

Summary: Previously, we had no information about the positioning of the view until after we had attached it.  We have the position information attached to the shadow node, but this attaches it to the DrawView as well.  It also removes the need for AbstractClippingDrawCommand.

Reviewed By: ahmedre

Differential Revision: D3609092
This commit is contained in:
Seth Kirby
2016-07-26 17:31:54 -07:00
committed by Ahmed El-Helw
parent ba56043715
commit 498fc63952
8 changed files with 194 additions and 129 deletions

View File

@@ -536,6 +536,10 @@ import com.facebook.react.uimanager.events.EventDispatcher;
addNativeChild(node);
if (!parentIsAndroidView) {
mDrawCommands.add(node.collectDrawView(
left,
top,
right,
bottom,
parentClipLeft,
parentClipTop,
parentClipRight,
@@ -544,8 +548,8 @@ import com.facebook.react.uimanager.events.EventDispatcher;
updated = collectStateForMountableNode(
node,
left - left,
top - top,
0, // left - left
0, // top - top
right - left,
bottom - top,
parentClipLeft - left,