summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/trebuchet/CellLayout.java
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2013-02-25 15:00:36 -0800
committerArne Coucheron <arco68@gmail.com>2013-08-12 16:56:17 +0200
commit00d82d3d5dd713b286fa7f58d38086089a981c28 (patch)
tree553d049fec4d9e8901e76da59eb2b91b9447b7d9 /src/com/cyanogenmod/trebuchet/CellLayout.java
parent105fabe129cc6942bb8669694034f35ff6881082 (diff)
downloadandroid_packages_apps_Trebuchet-00d82d3d5dd713b286fa7f58d38086089a981c28.tar.gz
android_packages_apps_Trebuchet-00d82d3d5dd713b286fa7f58d38086089a981c28.tar.bz2
android_packages_apps_Trebuchet-00d82d3d5dd713b286fa7f58d38086089a981c28.zip
Disable clipping where unnecessary
This change prevents the renderer from using a stencil buffer to render rotated CellLayouts. Change-Id: I0414f59ed45502323ab588820ceb4a5e3ec17140
Diffstat (limited to 'src/com/cyanogenmod/trebuchet/CellLayout.java')
-rw-r--r--src/com/cyanogenmod/trebuchet/CellLayout.java5
1 files changed, 5 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);