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

Commit d66f2eb2 authored by Diego Perez's avatar Diego Perez Committed by Android Git Automerger
Browse files

am a0fb87a3: am 98c3461a: Merge "Do not paint shadow if outside of the clip...

am a0fb87a3: am 98c3461a: Merge "Do not paint shadow if outside of the clip area" into lmp-dev automerge: a912fedb

* commit 'a0fb87a3':
  Do not paint shadow if outside of the clip area
parents f12d0233 a0fb87a3
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -71,8 +71,10 @@ public class ViewGroup_Delegate {
        int x = 0;
        if (outline.mRect != null) {
            Shadow s = getRectShadow(parent, canvas, child, outline);
            if (s != null) {
              shadow = s.mShadow;
              x = -s.mShadowWidth;
            }
        } else if (outline.mPath != null) {
            shadow = getPathShadow(child, outline, canvas);
        }
@@ -132,6 +134,9 @@ public class ViewGroup_Delegate {

    private static BufferedImage getPathShadow(View child, Outline outline, Canvas canvas) {
        Rect clipBounds = canvas.getClipBounds();
        if (clipBounds.isEmpty()) {
          return null;
        }
        BufferedImage image = new BufferedImage(clipBounds.width(), clipBounds.height(),
                BufferedImage.TYPE_INT_ARGB);
        Graphics2D graphics = image.createGraphics();