Loading core/java/android/view/View.java +6 −12 Original line number Original line Diff line number Diff line Loading @@ -14768,27 +14768,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * this view, to which future drawing operations will be clipped. * this view, to which future drawing operations will be clipped. */ */ public void setClipBounds(Rect clipBounds) { public void setClipBounds(Rect clipBounds) { if (clipBounds != null) { if (clipBounds == mClipBounds if (clipBounds.equals(mClipBounds)) { || (clipBounds != null && clipBounds.equals(mClipBounds))) { return; return; } } if (clipBounds != null) { if (mClipBounds == null) { if (mClipBounds == null) { invalidate(); mClipBounds = new Rect(clipBounds); mClipBounds = new Rect(clipBounds); } else { } else { invalidate(Math.min(mClipBounds.left, clipBounds.left), Math.min(mClipBounds.top, clipBounds.top), Math.max(mClipBounds.right, clipBounds.right), Math.max(mClipBounds.bottom, clipBounds.bottom)); mClipBounds.set(clipBounds); mClipBounds.set(clipBounds); } } } else { } else { if (mClipBounds != null) { invalidate(); mClipBounds = null; mClipBounds = null; } } } mRenderNode.setClipBounds(mClipBounds); mRenderNode.setClipBounds(mClipBounds); invalidateViewProperty(false, false); } } /** /** Loading
core/java/android/view/View.java +6 −12 Original line number Original line Diff line number Diff line Loading @@ -14768,27 +14768,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * this view, to which future drawing operations will be clipped. * this view, to which future drawing operations will be clipped. */ */ public void setClipBounds(Rect clipBounds) { public void setClipBounds(Rect clipBounds) { if (clipBounds != null) { if (clipBounds == mClipBounds if (clipBounds.equals(mClipBounds)) { || (clipBounds != null && clipBounds.equals(mClipBounds))) { return; return; } } if (clipBounds != null) { if (mClipBounds == null) { if (mClipBounds == null) { invalidate(); mClipBounds = new Rect(clipBounds); mClipBounds = new Rect(clipBounds); } else { } else { invalidate(Math.min(mClipBounds.left, clipBounds.left), Math.min(mClipBounds.top, clipBounds.top), Math.max(mClipBounds.right, clipBounds.right), Math.max(mClipBounds.bottom, clipBounds.bottom)); mClipBounds.set(clipBounds); mClipBounds.set(clipBounds); } } } else { } else { if (mClipBounds != null) { invalidate(); mClipBounds = null; mClipBounds = null; } } } mRenderNode.setClipBounds(mClipBounds); mRenderNode.setClipBounds(mClipBounds); invalidateViewProperty(false, false); } } /** /**