Merge "Fast transform properties setters. Bug #3413510" into honeycomb
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user