Loading core/java/android/view/View.java +9 −9 Original line number Diff line number Diff line Loading @@ -16070,23 +16070,23 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } else if (cache != null) { mPrivateFlags &= ~PFLAG_DIRTY_MASK; Paint cachePaint; int restoreAlpha = 0; if (layerType == LAYER_TYPE_NONE) { cachePaint = parent.mCachePaint; // no layer paint, use temporary paint to draw bitmap Paint cachePaint = parent.mCachePaint; if (cachePaint == null) { cachePaint = new Paint(); cachePaint.setDither(false); parent.mCachePaint = cachePaint; } } else { cachePaint = mLayerPaint; restoreAlpha = mLayerPaint.getAlpha(); } cachePaint.setAlpha((int) (alpha * 255)); canvas.drawBitmap(cache, 0.0f, 0.0f, cachePaint); cachePaint.setAlpha(restoreAlpha); } else { // use layer paint to draw the bitmap, merging the two alphas, but also restore int layerPaintAlpha = mLayerPaint.getAlpha(); mLayerPaint.setAlpha((int) (alpha * layerPaintAlpha)); canvas.drawBitmap(cache, 0.0f, 0.0f, mLayerPaint); mLayerPaint.setAlpha(layerPaintAlpha); } } if (restoreTo >= 0) { Loading
core/java/android/view/View.java +9 −9 Original line number Diff line number Diff line Loading @@ -16070,23 +16070,23 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } else if (cache != null) { mPrivateFlags &= ~PFLAG_DIRTY_MASK; Paint cachePaint; int restoreAlpha = 0; if (layerType == LAYER_TYPE_NONE) { cachePaint = parent.mCachePaint; // no layer paint, use temporary paint to draw bitmap Paint cachePaint = parent.mCachePaint; if (cachePaint == null) { cachePaint = new Paint(); cachePaint.setDither(false); parent.mCachePaint = cachePaint; } } else { cachePaint = mLayerPaint; restoreAlpha = mLayerPaint.getAlpha(); } cachePaint.setAlpha((int) (alpha * 255)); canvas.drawBitmap(cache, 0.0f, 0.0f, cachePaint); cachePaint.setAlpha(restoreAlpha); } else { // use layer paint to draw the bitmap, merging the two alphas, but also restore int layerPaintAlpha = mLayerPaint.getAlpha(); mLayerPaint.setAlpha((int) (alpha * layerPaintAlpha)); canvas.drawBitmap(cache, 0.0f, 0.0f, mLayerPaint); mLayerPaint.setAlpha(layerPaintAlpha); } } if (restoreTo >= 0) {