mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-03 22:48:25 +08:00
Implement RemoveClippedSubviews for Nodes
Summary: RN has an optimization in which a ScrollView (or similar ViewGroups) can ask to remove clipped subviews from the View hierarchy. This patch implements this optimization for Nodes, but instead of adding and removing the Views, it attaches and detaches Views instead. Note that this patch does not handle overflow: visible. This is addressed in a stacked patch on top of this patch (to simplify the review process). Reviewed By: astreet Differential Revision: D3235050
This commit is contained in:
@@ -13,9 +13,11 @@ import android.graphics.Canvas;
|
||||
|
||||
/* package */ final class DrawView extends AbstractClippingDrawCommand {
|
||||
|
||||
/* package */ static final DrawView INSTANCE = new DrawView(0, 0, 0, 0);
|
||||
/* package */ final int reactTag;
|
||||
/* package */ boolean isViewGroupClipped;
|
||||
|
||||
public DrawView(float clipLeft, float clipTop, float clipRight, float clipBottom) {
|
||||
public DrawView(int reactTag, float clipLeft, float clipTop, float clipRight, float clipBottom) {
|
||||
this.reactTag = reactTag;
|
||||
setClipBounds(clipLeft, clipTop, clipRight, clipBottom);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user