summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/cyanogenmod/trebuchet/CellLayout.java5
-rw-r--r--src/com/cyanogenmod/trebuchet/Workspace.java2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/trebuchet/CellLayout.java b/src/com/cyanogenmod/trebuchet/CellLayout.java
index 76865af3f..21f6725ab 100644
--- a/src/com/cyanogenmod/trebuchet/CellLayout.java
+++ b/src/com/cyanogenmod/trebuchet/CellLayout.java
@@ -182,6 +182,11 @@ public class CellLayout extends ViewGroup {
// A ViewGroup usually does not draw, but CellLayout needs to draw a rectangle to show
// the user where a dragged item will land when dropped.
setWillNotDraw(false);
+ // CellLayout guarantees its children are not laid out outside of its bounds,
+ // child clipping is thus unnecessary and disabling it offers better performance
+ // when we rotate the whole layout
+ setClipChildren(false);
+ setClipToPadding(false);
mLauncher = (Launcher) context;
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CellLayout, defStyle, 0);
diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java
index b81655cb7..e69c426ca 100644
--- a/src/com/cyanogenmod/trebuchet/Workspace.java
+++ b/src/com/cyanogenmod/trebuchet/Workspace.java
@@ -520,6 +520,8 @@ public class Workspace extends PagedView
LauncherApplication app = (LauncherApplication)context.getApplicationContext();
mIconCache = app.getIconCache();
setWillNotDraw(false);
+ setClipChildren(false);
+ setClipToPadding(false);
setChildrenDrawnWithCacheEnabled(true);
final Resources res = getResources();