Merge "Simplifying logic to create/destroy hardware layers in All Apps"

This commit is contained in:
Michael Jurka
2011-02-16 14:56:53 -08:00
committed by Android (Google) Code Review
3 changed files with 2 additions and 14 deletions
-14
View File
@@ -598,21 +598,7 @@ public abstract class PagedView extends ViewGroup {
canvas.clipRect(mScrollX, mScrollY, mScrollX + mRight - mLeft,
mScrollY + mBottom - mTop);
for (int i = 0; i < pageCount; i++) {
View child = getChildAt(i);
if (child != null && child instanceof PagedViewCellLayout) {
boolean willBeDrawn = i >= leftScreen && i <= rightScreen;
if (!willBeDrawn) {
((PagedViewCellLayout)child).destroyHardwareLayers();
}
}
}
for (int i = leftScreen; i <= rightScreen; i++) {
View child = getChildAt(i);
if (child != null && child instanceof PagedViewCellLayout) {
((PagedViewCellLayout)child).createHardwareLayers();
}
drawChild(canvas, getChildAt(i), drawingTime);
}
canvas.restore();