diff options
Diffstat (limited to 'src/com/android/launcher2/PagedView.java')
-rw-r--r-- | src/com/android/launcher2/PagedView.java | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java index ad0baf44d..4765dae02 100644 --- a/src/com/android/launcher2/PagedView.java +++ b/src/com/android/launcher2/PagedView.java @@ -18,7 +18,6 @@ package com.android.launcher2; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; -import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.content.Context; import android.content.res.TypedArray; @@ -791,20 +790,11 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc canvas.clipRect(getScrollX(), getScrollY(), getScrollX() + getRight() - getLeft(), getScrollY() + getBottom() - getTop()); - // On certain graphics drivers, if you draw to a off-screen buffer that's not - // used, it can lead to poor performance. We were running into this when - // setChildrenLayersEnabled was called on a CellLayout; that triggered a re-draw - // of that CellLayout's hardware layer, even if that CellLayout wasn't visible. - // As a fix, below we set pages that aren't going to be rendered are to be - // View.INVISIBLE, preventing re-drawing of their hardware layer for (int i = getChildCount() - 1; i >= 0; i--) { final View v = getPageAt(i); if (mForceDrawAllChildrenNextFrame || (leftScreen <= i && i <= rightScreen && shouldDrawChild(v))) { - v.setVisibility(VISIBLE); drawChild(canvas, v, drawingTime); - } else { - v.setVisibility(INVISIBLE); } } mForceDrawAllChildrenNextFrame = false; @@ -1756,7 +1746,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc if (immediately) { mScrollIndicator.setAlpha(1f); } else { - mScrollIndicatorAnimator = ObjectAnimator.ofFloat(mScrollIndicator, "alpha", 1f); + mScrollIndicatorAnimator = LauncherAnimUtils.ofFloat(mScrollIndicator, "alpha", 1f); mScrollIndicatorAnimator.setDuration(sScrollIndicatorFadeInDuration); mScrollIndicatorAnimator.start(); } @@ -1782,7 +1772,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc mScrollIndicator.setVisibility(View.INVISIBLE); mScrollIndicator.setAlpha(0f); } else { - mScrollIndicatorAnimator = ObjectAnimator.ofFloat(mScrollIndicator, "alpha", 0f); + mScrollIndicatorAnimator = LauncherAnimUtils.ofFloat(mScrollIndicator, "alpha", 0f); mScrollIndicatorAnimator.setDuration(sScrollIndicatorFadeOutDuration); mScrollIndicatorAnimator.addListener(new AnimatorListenerAdapter() { private boolean cancelled = false; |