diff options
author | Adam Cohen <adamcohen@google.com> | 2011-08-25 14:06:02 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2011-08-25 14:06:02 -0700 |
commit | 7ef918374acd7e1564fa1462053b8ac0bfd4ed67 (patch) | |
tree | 2044dfdeab1f62af0a231804ce0a3f4ed7a18cc7 /src | |
parent | b8fb52499ad9a3cb2f326720722946a5ce5c06dd (diff) | |
download | android_packages_apps_Trebuchet-7ef918374acd7e1564fa1462053b8ac0bfd4ed67.tar.gz android_packages_apps_Trebuchet-7ef918374acd7e1564fa1462053b8ac0bfd4ed67.tar.bz2 android_packages_apps_Trebuchet-7ef918374acd7e1564fa1462053b8ac0bfd4ed67.zip |
Using a single hardware layer for each workspace screen
-> Used to use a layer for each icon / widget on phone UI
Change-Id: Iebf2dc89284630343883d1e60a29d724f5423eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index bf2b9f83e..667df8bec 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -292,20 +292,8 @@ public class CellLayout extends ViewGroup { return minGap * (numCells - 1) + cellHeight * numCells; } - @Override - public void setChildrenLayersEnabled(boolean enabled) { - // see "Hardware Layer Note" lower in the code - if (LauncherApplication.isScreenLarge()) { - super.setChildrenLayersEnabled(enabled); - } else { - mChildren.setChildrenLayersEnabled(enabled); - } - } public void enableHardwareLayers() { - // see "Hardware Layer Note" lower in the code - if (LauncherApplication.isScreenLarge()) { - mChildren.enableHardwareLayers(); - } + mChildren.enableHardwareLayers(); } public void setGridSize(int x, int y) { @@ -650,16 +638,6 @@ public class CellLayout extends ViewGroup { child.setId(childId); - if (!LauncherApplication.isScreenLarge()) { - // Hardware Layer Note: - // On phones, we set hardware layers on individual items - // On tablets, we set hardware layers on the entire mChildren view - // Setting the hardware layers on individual items only uses - // less memory but on tablet-size devices it has worse performance - // (a drop of ~6fps) whereas on phones the performance is the same - // with both approaches - child.setLayerType(LAYER_TYPE_HARDWARE, null); - } mChildren.addView(child, index, lp); if (markCells) markCellsAsOccupiedForView(child); @@ -1175,7 +1153,6 @@ public class CellLayout extends ViewGroup { int left = topLeft[0]; int top = topLeft[1]; - if (v != null) { // When drawing the drag outline, it did not account for margin offsets // added by the view's parent. |