summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/view/View.java66
1 files changed, 66 insertions, 0 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 6abfe81..cac345d 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6450,6 +6450,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
*
* @param outRect The hit rectangle of the view.
@@ -6990,6 +7037,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),
* which is necessary when various parent-managed properties of the view change, such as