Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37cdc191 authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Don't invalidate() on setClipBounds" into lmp-mr1-dev

parents 3cf61d4b 9029e5ec
Loading
Loading
Loading
Loading
+6 −12
Original line number Original line Diff line number Diff line
@@ -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);
    }
    }
    /**
    /**