Merge "Remove unnecessary allocations during draw Bug #7327799" into jb-mr1-dev

This commit is contained in:
Romain Guy
2012-10-11 11:10:47 -07:00
committed by Android (Google) Code Review
+8 -6
View File
@@ -254,6 +254,13 @@ public class Workspace extends SmoothPagedView
private float[] mNewRotationYs;
private float mTransitionProgress;
private final Runnable mBindPages = new Runnable() {
@Override
public void run() {
mLauncher.getModel().bindRemainingSynchronousPages();
}
};
/**
* Used to inflate the Workspace from XML.
*
@@ -1292,12 +1299,7 @@ public class Workspace extends SmoothPagedView
super.onDraw(canvas);
// Call back to LauncherModel to finish binding after the first draw
post(new Runnable() {
@Override
public void run() {
mLauncher.getModel().bindRemainingSynchronousPages();
}
});
post(mBindPages);
}
boolean isDrawingBackgroundGradient() {