diff options
author | Romain Guy <romainguy@google.com> | 2013-02-25 15:00:36 -0800 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2013-02-25 15:42:16 -0800 |
commit | ce3cbd145b4222779abae32869da8dd3c2aefb67 (patch) | |
tree | a0db8eb50a0afc3dd4b1f57f8d5c858c1fddaf38 /src/com/android/launcher2/CellLayout.java | |
parent | 4ae12dba547fe130f7327df151775777ae5cd72c (diff) | |
download | android_packages_apps_Trebuchet-ce3cbd145b4222779abae32869da8dd3c2aefb67.tar.gz android_packages_apps_Trebuchet-ce3cbd145b4222779abae32869da8dd3c2aefb67.tar.bz2 android_packages_apps_Trebuchet-ce3cbd145b4222779abae32869da8dd3c2aefb67.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/android/launcher2/CellLayout.java')
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index 7818da435..23d1d61c8 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -181,6 +181,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); |