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

Commit 20bf23e5 authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am ac14db72: Merge "Fast transform properties setters. Bug #3413510" into honeycomb

* commit 'ac14db72':
  Fast transform properties setters. Bug #3413510
parents a2e82d4c ac14db72
Loading
Loading
Loading
Loading
+66 −0
Original line number Diff line number Diff line
@@ -6406,6 +6406,53 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
        }
    }

    /**
     * @hide
     */
    public void setFastX(float x) {
        mTranslationX = x - mLeft;
        mMatrixDirty = true;
    }

    /**
     * @hide
     */
    public void setFastY(float y) {
        mTranslationY = y - mTop;
        mMatrixDirty = true;
    }
    
    /**
     * @hide
     */
    public void setFastScaleX(float x) {
        mScaleX = x;
        mMatrixDirty = true;
    }

    /**
     * @hide
     */
    public void setFastScaleY(float y) {
        mScaleY = y;
        mMatrixDirty = true;
    }

    /**
     * @hide
     */
    public void setFastAlpha(float alpha) {
        mAlpha = alpha;
    }
    
    /**
     * @hide
     */
    public void setFastRotationY(float y) {
        mRotationY = y;
        mMatrixDirty = true;
    }
    
    /**
     * Hit rectangle in parent's coordinates
     *
@@ -6946,6 +6993,25 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
        }
    }

    /**
     * @hide
     */
    public void fastInvalidate() {
        if ((mPrivateFlags & (DRAWN | HAS_BOUNDS)) == (DRAWN | HAS_BOUNDS) ||
            (mPrivateFlags & DRAWING_CACHE_VALID) == DRAWING_CACHE_VALID ||
            (mPrivateFlags & INVALIDATED) != INVALIDATED) {
            if (mParent instanceof View) {
                ((View) mParent).mPrivateFlags |= INVALIDATED;
            }
            mPrivateFlags &= ~DRAWN;
            mPrivateFlags |= INVALIDATED;
            mPrivateFlags &= ~DRAWING_CACHE_VALID;
            if (mParent != null && mAttachInfo != null && mAttachInfo.mHardwareAccelerated) {
                mParent.invalidateChild(this, null);
            }
        }
    }

    /**
     * Used to indicate that the parent of this view should clear its caches. This functionality
     * is used to force the parent to rebuild its display list (when hardware-accelerated),