Merge "Simplifying logic to create/destroy hardware layers in All Apps"
This commit is contained in:
committed by
Android (Google) Code Review
commit
e4340a1e32
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user