Loading core/java/android/view/GLES20DisplayList.java +2 −1 Original line number Diff line number Diff line Loading @@ -131,7 +131,8 @@ class GLES20DisplayList extends DisplayList { @Override public void setAnimationMatrix(Matrix matrix) { try { nSetAnimationMatrix(getNativeDisplayList(), matrix.native_instance); nSetAnimationMatrix(getNativeDisplayList(), (matrix != null) ? matrix.native_instance : 0); } catch (IllegalStateException e) { // invalid DisplayList okay: we'll set current values the next time we render to it } Loading core/java/android/view/View.java +27 −9 Original line number Diff line number Diff line Loading @@ -2128,6 +2128,13 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal */ static final int ACCESSIBILITY_STATE_CHANGED = 0x00000080 << IMPORTANT_FOR_ACCESSIBILITY_SHIFT; /** * Flag indicating that view has an animation set on it. This is used to track whether an * animation is cleared between successive frames, in order to tell the associated * DisplayList to clear its animation matrix. */ static final int VIEW_IS_ANIMATING_TRANSFORM = 0x10000000; /* End of masks for mPrivateFlags2 */ static final int DRAG_MASK = DRAG_CAN_ACCEPT | DRAG_HOVERED; Loading Loading @@ -12777,8 +12784,18 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal if (a != null) { more = drawAnimation(parent, drawingTime, a, scalingRequired); concatMatrix = a.willChangeTransformationMatrix(); if (concatMatrix) { mPrivateFlags2 |= VIEW_IS_ANIMATING_TRANSFORM; } transformToApply = parent.mChildTransformation; } else if (!useDisplayListProperties && } else { if ((mPrivateFlags2 & VIEW_IS_ANIMATING_TRANSFORM) == VIEW_IS_ANIMATING_TRANSFORM && mDisplayList != null) { // No longer animating: clear out old animation matrix mDisplayList.setAnimationMatrix(null); mPrivateFlags2 &= ~VIEW_IS_ANIMATING_TRANSFORM; } if (!useDisplayListProperties && (flags & ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS) != 0) { final boolean hasTransform = parent.getChildStaticTransformation(this, parent.mChildTransformation); Loading @@ -12789,6 +12806,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal concatMatrix = (transformType & Transformation.TYPE_MATRIX) != 0; } } } concatMatrix |= !childHasIdentityMatrix; Loading Loading
core/java/android/view/GLES20DisplayList.java +2 −1 Original line number Diff line number Diff line Loading @@ -131,7 +131,8 @@ class GLES20DisplayList extends DisplayList { @Override public void setAnimationMatrix(Matrix matrix) { try { nSetAnimationMatrix(getNativeDisplayList(), matrix.native_instance); nSetAnimationMatrix(getNativeDisplayList(), (matrix != null) ? matrix.native_instance : 0); } catch (IllegalStateException e) { // invalid DisplayList okay: we'll set current values the next time we render to it } Loading
core/java/android/view/View.java +27 −9 Original line number Diff line number Diff line Loading @@ -2128,6 +2128,13 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal */ static final int ACCESSIBILITY_STATE_CHANGED = 0x00000080 << IMPORTANT_FOR_ACCESSIBILITY_SHIFT; /** * Flag indicating that view has an animation set on it. This is used to track whether an * animation is cleared between successive frames, in order to tell the associated * DisplayList to clear its animation matrix. */ static final int VIEW_IS_ANIMATING_TRANSFORM = 0x10000000; /* End of masks for mPrivateFlags2 */ static final int DRAG_MASK = DRAG_CAN_ACCEPT | DRAG_HOVERED; Loading Loading @@ -12777,8 +12784,18 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal if (a != null) { more = drawAnimation(parent, drawingTime, a, scalingRequired); concatMatrix = a.willChangeTransformationMatrix(); if (concatMatrix) { mPrivateFlags2 |= VIEW_IS_ANIMATING_TRANSFORM; } transformToApply = parent.mChildTransformation; } else if (!useDisplayListProperties && } else { if ((mPrivateFlags2 & VIEW_IS_ANIMATING_TRANSFORM) == VIEW_IS_ANIMATING_TRANSFORM && mDisplayList != null) { // No longer animating: clear out old animation matrix mDisplayList.setAnimationMatrix(null); mPrivateFlags2 &= ~VIEW_IS_ANIMATING_TRANSFORM; } if (!useDisplayListProperties && (flags & ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS) != 0) { final boolean hasTransform = parent.getChildStaticTransformation(this, parent.mChildTransformation); Loading @@ -12789,6 +12806,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal concatMatrix = (transformType & Transformation.TYPE_MATRIX) != 0; } } } concatMatrix |= !childHasIdentityMatrix; Loading