No longer using fastInvalidate() pattern for half of AllApps transition
Turns out this was likely causing the hardware layer to be redrawn and hence an anti-optimization Change-Id: Ib98beebec6efed339eb9f918c24579af529e028e
This commit is contained in:
@@ -2221,21 +2221,19 @@ public final class Launcher extends Activity
|
|||||||
scaleAnim.setInterpolator(new Workspace.ZoomOutInterpolator());
|
scaleAnim.setInterpolator(new Workspace.ZoomOutInterpolator());
|
||||||
scaleAnim.addUpdateListener(new LauncherAnimatorUpdateListener() {
|
scaleAnim.addUpdateListener(new LauncherAnimatorUpdateListener() {
|
||||||
public void onAnimationUpdate(float a, float b) {
|
public void onAnimationUpdate(float a, float b) {
|
||||||
((View) toView.getParent()).invalidate();
|
toView.setScaleX(a * scale + b * 1f);
|
||||||
toView.fastInvalidate();
|
toView.setScaleY(a * scale + b * 1f);
|
||||||
toView.setFastScaleX(a * scale + b * 1f);
|
|
||||||
toView.setFastScaleY(a * scale + b * 1f);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
toView.setVisibility(View.VISIBLE);
|
toView.setVisibility(View.VISIBLE);
|
||||||
toView.setFastAlpha(0f);
|
toView.setAlpha(0f);
|
||||||
ValueAnimator alphaAnim = ValueAnimator.ofFloat(0f, 1f).setDuration(fadeDuration);
|
ValueAnimator alphaAnim = ValueAnimator.ofFloat(0f, 1f).setDuration(fadeDuration);
|
||||||
alphaAnim.setInterpolator(new DecelerateInterpolator(1.5f));
|
alphaAnim.setInterpolator(new DecelerateInterpolator(1.5f));
|
||||||
alphaAnim.addUpdateListener(new LauncherAnimatorUpdateListener() {
|
alphaAnim.addUpdateListener(new LauncherAnimatorUpdateListener() {
|
||||||
public void onAnimationUpdate(float a, float b) {
|
public void onAnimationUpdate(float a, float b) {
|
||||||
// don't need to invalidate because we do so above
|
// don't need to invalidate because we do so above
|
||||||
toView.setFastAlpha(a * 0f + b * 1f);
|
toView.setAlpha(a * 0f + b * 1f);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
alphaAnim.setStartDelay(startDelay);
|
alphaAnim.setStartDelay(startDelay);
|
||||||
@@ -2346,9 +2344,8 @@ public final class Launcher extends Activity
|
|||||||
scaleAnim.setInterpolator(new Workspace.ZoomInInterpolator());
|
scaleAnim.setInterpolator(new Workspace.ZoomInInterpolator());
|
||||||
scaleAnim.addUpdateListener(new LauncherAnimatorUpdateListener() {
|
scaleAnim.addUpdateListener(new LauncherAnimatorUpdateListener() {
|
||||||
public void onAnimationUpdate(float a, float b) {
|
public void onAnimationUpdate(float a, float b) {
|
||||||
((View)fromView.getParent()).fastInvalidate();
|
fromView.setScaleX(a * oldScaleX + b * scaleFactor);
|
||||||
fromView.setFastScaleX(a * oldScaleX + b * scaleFactor);
|
fromView.setScaleY(a * oldScaleY + b * scaleFactor);
|
||||||
fromView.setFastScaleY(a * oldScaleY + b * scaleFactor);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
final ValueAnimator alphaAnim = ValueAnimator.ofFloat(0f, 1f);
|
final ValueAnimator alphaAnim = ValueAnimator.ofFloat(0f, 1f);
|
||||||
@@ -2356,8 +2353,7 @@ public final class Launcher extends Activity
|
|||||||
alphaAnim.setInterpolator(new AccelerateDecelerateInterpolator());
|
alphaAnim.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||||
alphaAnim.addUpdateListener(new LauncherAnimatorUpdateListener() {
|
alphaAnim.addUpdateListener(new LauncherAnimatorUpdateListener() {
|
||||||
public void onAnimationUpdate(float a, float b) {
|
public void onAnimationUpdate(float a, float b) {
|
||||||
// don't need to invalidate because we do so above
|
fromView.setAlpha(a * 1f + b * 0f);
|
||||||
fromView.setFastAlpha(a * 1f + b * 0f);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (fromView instanceof LauncherTransitionable) {
|
if (fromView instanceof LauncherTransitionable) {
|
||||||
|
|||||||
Reference in New Issue
Block a user