Add directional clipping command manager.

Summary: Add directional aware clipping to DrawCommandManager.  Currently not attached to FlatViewGroup logic, with the plan to keep this unattached until we are clipping the way we want to in the final state.

Reviewed By: ahmedre

Differential Revision: D3622253
This commit is contained in:
Seth Kirby
2016-08-01 12:26:50 -07:00
committed by Ahmed El-Helw
parent f850e61fdb
commit e96f6fa585
10 changed files with 391 additions and 43 deletions

View File

@@ -536,6 +536,17 @@ import com.facebook.react.uimanager.events.EventDispatcher;
ensureBackingViewIsCreated(node);
addNativeChild(node);
updated = collectStateForMountableNode(
node,
0, // left - left
0, // top - top
right - left,
bottom - top,
parentClipLeft - left,
parentClipTop - top,
parentClipRight - left,
parentClipBottom - top);
if (!parentIsAndroidView) {
mDrawCommands.add(node.collectDrawView(
left,
@@ -548,17 +559,6 @@ import com.facebook.react.uimanager.events.EventDispatcher;
parentClipBottom));
}
updated = collectStateForMountableNode(
node,
0, // left - left
0, // top - top
right - left,
bottom - top,
parentClipLeft - left,
parentClipTop - top,
parentClipRight - left,
parentClipBottom - top);
if (!needsCustomLayout) {
updateViewBounds(node, left, top, right, bottom);
}