Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadowKeyDrawable.java +11 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,12 @@ public class ShadowKeyDrawable extends Drawable { if (bounds.isEmpty()) { return; } if (mState.mLastDrawnBitmap == null) { // If no cache or previous cached bitmap is hardware/software acceleration does not match // the current canvas on draw then regenerate if (mState.mLastDrawnBitmap == null || mState.mIsHardwareBitmap != canvas.isHardwareAccelerated()) { mState.mIsHardwareBitmap = canvas.isHardwareAccelerated(); regenerateBitmapCache(); } canvas.drawBitmap(mState.mLastDrawnBitmap, null, bounds, mPaint); Loading Loading @@ -171,7 +176,10 @@ public class ShadowKeyDrawable extends Drawable { d.draw(canvas); } if (mState.mIsHardwareBitmap) { bitmap = bitmap.copy(Bitmap.Config.HARDWARE, false); } mState.mLastDrawnBitmap = bitmap; canvas.restore(); } Loading @@ -186,6 +194,7 @@ public class ShadowKeyDrawable extends Drawable { int mShadowSize; int mShadowColor; boolean mIsHardwareBitmap; Bitmap mLastDrawnBitmap; ConstantState mChildState; Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadowKeyDrawable.java +11 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,12 @@ public class ShadowKeyDrawable extends Drawable { if (bounds.isEmpty()) { return; } if (mState.mLastDrawnBitmap == null) { // If no cache or previous cached bitmap is hardware/software acceleration does not match // the current canvas on draw then regenerate if (mState.mLastDrawnBitmap == null || mState.mIsHardwareBitmap != canvas.isHardwareAccelerated()) { mState.mIsHardwareBitmap = canvas.isHardwareAccelerated(); regenerateBitmapCache(); } canvas.drawBitmap(mState.mLastDrawnBitmap, null, bounds, mPaint); Loading Loading @@ -171,7 +176,10 @@ public class ShadowKeyDrawable extends Drawable { d.draw(canvas); } if (mState.mIsHardwareBitmap) { bitmap = bitmap.copy(Bitmap.Config.HARDWARE, false); } mState.mLastDrawnBitmap = bitmap; canvas.restore(); } Loading @@ -186,6 +194,7 @@ public class ShadowKeyDrawable extends Drawable { int mShadowSize; int mShadowColor; boolean mIsHardwareBitmap; Bitmap mLastDrawnBitmap; ConstantState mChildState; Loading