Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadowKeyDrawable.java +11 −2 Original line number Original line Diff line number Diff line Loading @@ -82,7 +82,12 @@ public class ShadowKeyDrawable extends Drawable { if (bounds.isEmpty()) { if (bounds.isEmpty()) { return; 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(); regenerateBitmapCache(); } } canvas.drawBitmap(mState.mLastDrawnBitmap, null, bounds, mPaint); canvas.drawBitmap(mState.mLastDrawnBitmap, null, bounds, mPaint); Loading Loading @@ -171,7 +176,10 @@ public class ShadowKeyDrawable extends Drawable { d.draw(canvas); d.draw(canvas); } } if (mState.mIsHardwareBitmap) { bitmap = bitmap.copy(Bitmap.Config.HARDWARE, false); bitmap = bitmap.copy(Bitmap.Config.HARDWARE, false); } mState.mLastDrawnBitmap = bitmap; mState.mLastDrawnBitmap = bitmap; canvas.restore(); canvas.restore(); } } Loading @@ -186,6 +194,7 @@ public class ShadowKeyDrawable extends Drawable { int mShadowSize; int mShadowSize; int mShadowColor; int mShadowColor; boolean mIsHardwareBitmap; Bitmap mLastDrawnBitmap; Bitmap mLastDrawnBitmap; ConstantState mChildState; ConstantState mChildState; Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadowKeyDrawable.java +11 −2 Original line number Original line Diff line number Diff line Loading @@ -82,7 +82,12 @@ public class ShadowKeyDrawable extends Drawable { if (bounds.isEmpty()) { if (bounds.isEmpty()) { return; 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(); regenerateBitmapCache(); } } canvas.drawBitmap(mState.mLastDrawnBitmap, null, bounds, mPaint); canvas.drawBitmap(mState.mLastDrawnBitmap, null, bounds, mPaint); Loading Loading @@ -171,7 +176,10 @@ public class ShadowKeyDrawable extends Drawable { d.draw(canvas); d.draw(canvas); } } if (mState.mIsHardwareBitmap) { bitmap = bitmap.copy(Bitmap.Config.HARDWARE, false); bitmap = bitmap.copy(Bitmap.Config.HARDWARE, false); } mState.mLastDrawnBitmap = bitmap; mState.mLastDrawnBitmap = bitmap; canvas.restore(); canvas.restore(); } } Loading @@ -186,6 +194,7 @@ public class ShadowKeyDrawable extends Drawable { int mShadowSize; int mShadowSize; int mShadowColor; int mShadowColor; boolean mIsHardwareBitmap; Bitmap mLastDrawnBitmap; Bitmap mLastDrawnBitmap; ConstantState mChildState; ConstantState mChildState; Loading