summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-02-16 14:56:53 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-02-16 14:56:53 -0800
commite4340a1e3223dbebbb5fff96b55f46ca86182ea8 (patch)
tree71b87d89ac431f561e68ce6e7065798293352dba /src
parentc7c75e01a61e93a4788ffa3d7ba4aeddcfd7215e (diff)
parentc5e49022bea70a1b0b6ada5431afbb6e951cc3f6 (diff)
downloadpackages_apps_trebuchet-e4340a1e3223dbebbb5fff96b55f46ca86182ea8.zip
packages_apps_trebuchet-e4340a1e3223dbebbb5fff96b55f46ca86182ea8.tar.gz
packages_apps_trebuchet-e4340a1e3223dbebbb5fff96b55f46ca86182ea8.tar.bz2
Merge "Simplifying logic to create/destroy hardware layers in All Apps"
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/AllAppsPagedView.java1
-rw-r--r--src/com/android/launcher2/PagedView.java14
-rw-r--r--src/com/android/launcher2/PagedViewCellLayout.java1
3 files changed, 2 insertions, 14 deletions
diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java
index daa5d64..1e4821a 100644
--- a/src/com/android/launcher2/AllAppsPagedView.java
+++ b/src/com/android/launcher2/AllAppsPagedView.java
@@ -515,6 +515,7 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All
layout.addViewToCellLayout(icon, -1, 0,
new PagedViewCellLayout.LayoutParams(0, 0, 4, 1));
}
+ layout.createHardwareLayers();
}
/*
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index 3719746..cb95235 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -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();
diff --git a/src/com/android/launcher2/PagedViewCellLayout.java b/src/com/android/launcher2/PagedViewCellLayout.java
index d64f3c9..57d41fa 100644
--- a/src/com/android/launcher2/PagedViewCellLayout.java
+++ b/src/com/android/launcher2/PagedViewCellLayout.java
@@ -141,6 +141,7 @@ public class PagedViewCellLayout extends ViewGroup implements Page {
public void removeAllViewsOnPage() {
mChildren.removeAllViews();
mHolographicChildren.removeAllViews();
+ destroyHardwareLayers();
}
@Override