am 274d24f1: am b70cfb91: Merge "Avoid saveLayer in RippleDrawable if the background won\'t draw" into lmp-mr1-dev
* commit '274d24f18d30eb18eaa4d9ece3056a3b9856721d': Avoid saveLayer in RippleDrawable if the background won't draw
This commit is contained in:
@@ -718,10 +718,12 @@ public class RippleDrawable extends LayerDrawable {
|
|||||||
final ChildDrawable[] array = mLayerState.mChildren;
|
final ChildDrawable[] array = mLayerState.mChildren;
|
||||||
final int count = mLayerState.mNum;
|
final int count = mLayerState.mNum;
|
||||||
|
|
||||||
// We don't need a layer if we don't expect to draw any ripples, we have
|
// We don't need a layer if we don't expect to draw any ripples or
|
||||||
// an explicit mask, or if the non-mask content is all opaque.
|
// a background, we have an explicit mask, or if the non-mask content
|
||||||
|
// is all opaque.
|
||||||
boolean needsLayer = false;
|
boolean needsLayer = false;
|
||||||
if ((mExitingRipplesCount > 0 || mBackground != null) && mMask == null) {
|
if ((mExitingRipplesCount > 0 || (mBackground != null && mBackground.shouldDraw()))
|
||||||
|
&& mMask == null) {
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
if (array[i].mId != R.id.mask
|
if (array[i].mId != R.id.mask
|
||||||
&& array[i].mDrawable.getOpacity() != PixelFormat.OPAQUE) {
|
&& array[i].mDrawable.getOpacity() != PixelFormat.OPAQUE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user