Improve the rendering speed of the lock screen by reporting the appropriate opacity for the background wallpaper.

This commit is contained in:
Romain Guy
2009-05-11 15:28:49 -07:00
parent b7e787fd40
commit 9593e0a007

View File

@@ -590,9 +590,11 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
*/
static private class FastBitmapDrawable extends Drawable {
private Bitmap mBitmap;
private int mOpacity;
private FastBitmapDrawable(Bitmap bitmap) {
mBitmap = bitmap;
mOpacity = mBitmap.hasAlpha() ? PixelFormat.TRANSLUCENT : PixelFormat.OPAQUE;
}
@Override
@@ -606,7 +608,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
@Override
public int getOpacity() {
return PixelFormat.TRANSLUCENT;
return mOpacity;
}
@Override