Disable clipping where unnecessary
This change prevents the renderer from using a stencil buffer to render rotated CellLayouts. Change-Id: I0414f59ed45502323ab588820ceb4a5e3ec17140
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -409,6 +409,8 @@ public class Workspace extends SmoothPagedView
|
||||
LauncherApplication app = (LauncherApplication)context.getApplicationContext();
|
||||
mIconCache = app.getIconCache();
|
||||
setWillNotDraw(false);
|
||||
setClipChildren(false);
|
||||
setClipToPadding(false);
|
||||
setChildrenDrawnWithCacheEnabled(true);
|
||||
|
||||
final Resources res = getResources();
|
||||
|
||||
Reference in New Issue
Block a user