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

@@ -90,4 +90,22 @@ import android.view.ViewParent;
"Cannot add view " + view + " to DrawCommandManager while it has a parent " + oldParent);
}
}
static DrawCommandManager getClippingInstance(
FlatViewGroup flatViewGroup,
DrawCommand[] drawCommands) {
return new ClippingDrawCommandManager(flatViewGroup, drawCommands);
}
static DrawCommandManager getVerticalClippingInstance(
FlatViewGroup flatViewGroup,
DrawCommand[] drawCommands) {
return new VerticalClippingDrawCommandManager(flatViewGroup, drawCommands);
}
static DrawCommandManager getHorizontalClippingInstance(
FlatViewGroup flatViewGroup,
DrawCommand[] drawCommands) {
return new HorizontalClippingDrawCommandManager(flatViewGroup, drawCommands);
}
}