am e41d819: Improve the rendering speed of the lock screen by reporting

Merge commit 'e41d81948e1f8e89c19ae30037b260ae3b2adea2'

* commit 'e41d81948e1f8e89c19ae30037b260ae3b2adea2':
  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:37:41 -07:00
committed by The Android Open Source Project

View File

@@ -551,9 +551,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
@@ -567,7 +569,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
@Override
public int getOpacity() {
return PixelFormat.TRANSLUCENT;
return mOpacity;
}
@Override