resolved conflicts for merge of b9c76f32 to ics-mr1

Change-Id: I7579e312c48c9f9279e93283629036a9332aa34c
This commit is contained in:
Michael Jurka committed 2011-11-10 02:36:08 -08:00
1 parent ec8bd08ad9
commit dde558b8b8
2 files changed
+47 -16

No files matched your search

+20 -2
View File
@@ -1241,6 +1241,19 @@ public class Workspace extends SmoothPagedView
@Override
protected void dispatchDraw(Canvas canvas) {
if (mChildrenLayersEnabled) {
getVisiblePages(mTempVisiblePagesRange);
final int leftScreen = mTempVisiblePagesRange[0];
final int rightScreen = mTempVisiblePagesRange[1];
if (leftScreen != -1 && rightScreen != -1) {
// calling setChildrenLayersEnabled on a view that's not visible/rendered
// causes slowdowns on some graphics cards, so we set it here to be sure
// it's only called when it's safe (ie when the view will be rendered)
for (int i = leftScreen; i <= rightScreen; i++) {
((ViewGroup)getPageAt(i)).setChildrenLayersEnabled(true);
}
}
}
super.dispatchDraw(canvas);
if (mInScrollArea && !LauncherApplication.isScreenLarge()) {
@@ -1345,8 +1358,13 @@ public class Workspace extends SmoothPagedView
if (enableChildrenLayers != mChildrenLayersEnabled) {
mChildrenLayersEnabled = enableChildrenLayers;
for (int i = 0; i < getPageCount(); i++) {
((ViewGroup)getChildAt(i)).setChildrenLayersEnabled(enableChildrenLayers);
// calling setChildrenLayersEnabled on a view that's not visible/rendered
// causes slowdowns on some graphics cards, so we only disable it here and leave
// the enabling to dispatchDraw
if (!enableChildrenLayers) {
for (int i = 0; i < getPageCount(); i++) {
((ViewGroup)getChildAt(i)).setChildrenLayersEnabled(false);
}
}
}
}