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

Commit 9029e5ec authored by John Reck's avatar John Reck
Browse files

Don't invalidate() on setClipBounds

Bug: 17510133

This is a RenderNode property now, so use
the faster invalidateViewProperty() shortcut
since a re-record isn't necessary

Change-Id: If3999bce9a1fb9b60e42f0ee624bb554361f96ac
parent b3ec64e1
Loading
Loading
Loading
Loading
+6 −12
Original line number Diff line number Diff line
@@ -14774,27 +14774,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * this view, to which future drawing operations will be clipped.
     */
    public void setClipBounds(Rect clipBounds) {
        if (clipBounds != null) {
            if (clipBounds.equals(mClipBounds)) {
        if (clipBounds == mClipBounds
                || (clipBounds != null && clipBounds.equals(mClipBounds))) {
            return;
        }
        if (clipBounds != null) {
            if (mClipBounds == null) {
                invalidate();
                mClipBounds = new Rect(clipBounds);
            } 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);
            }
        } else {
            if (mClipBounds != null) {
                invalidate();
            mClipBounds = null;
        }
        }
        mRenderNode.setClipBounds(mClipBounds);
        invalidateViewProperty(false, false);
    }
    /**