Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ebc0eb2 authored by Chris Craik's avatar Chris Craik
Browse files

Unify View alpha implies clipping behavior

bug:20254728

Change-Id: If472adf7c75ca9ccfeb0d22e005c1215aacfb80f
parent 340b198c
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -15468,12 +15468,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                        if (drawingWithRenderNode) {
                        if (drawingWithRenderNode) {
                            renderNode.setAlpha(alpha * getAlpha() * getTransitionAlpha());
                            renderNode.setAlpha(alpha * getAlpha() * getTransitionAlpha());
                        } else if (layerType == LAYER_TYPE_NONE) {
                        } else if (layerType == LAYER_TYPE_NONE) {
                            int layerFlags = Canvas.HAS_ALPHA_LAYER_SAVE_FLAG;
                            if ((parentFlags & ViewGroup.FLAG_CLIP_CHILDREN) != 0) {
                                layerFlags |= Canvas.CLIP_TO_LAYER_SAVE_FLAG;
                            }
                            canvas.saveLayerAlpha(sx, sy, sx + getWidth(), sy + getHeight(),
                            canvas.saveLayerAlpha(sx, sy, sx + getWidth(), sy + getHeight(),
                                    multipliedAlpha, layerFlags);
                                    multipliedAlpha);
                        }
                        }
                    } else {
                    } else {
                        // Alpha is handled by the child directly, clobber the layer's alpha
                        // Alpha is handled by the child directly, clobber the layer's alpha