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

Commit 0c8c0add authored by Derek Sollenberger's avatar Derek Sollenberger Committed by Android Git Automerger
Browse files

am c195ef73: am bee78812: Merge "Fix bug where we incorrectly clipped the...

am c195ef73: am bee78812: Merge "Fix bug where we incorrectly clipped the bounds to the device size." into jb-mr2-dev

* commit 'c195ef73':
  Fix bug where we incorrectly clipped the bounds to the device size.
parents 8987f06f c195ef73
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -968,12 +968,6 @@ static void doDrawTextDecorations(SkCanvas* canvas, jfloat x, jfloat y, jfloat l

        if (!result) {
            r.setEmpty();
        } else {
            // ensure the clip is not larger than the canvas
            SkRect canvasRect;
            SkISize deviceSize = canvas->getDeviceSize();
            canvasRect.iset(0, 0, deviceSize.fWidth, deviceSize.fHeight);
            r.intersect(canvasRect);
        }
        r.round(&ir);

+5 −2
Original line number Diff line number Diff line
@@ -781,7 +781,10 @@ public class Canvas {
    }

    /**
     * Retrieve the clip bounds, returning true if they are non-empty.
     * Return the bounds of the current clip (in local coordinates) in the
     * bounds parameter, and return true if it is non-empty. This can be useful
     * in a way similar to quickReject, in that it tells you that drawing
     * outside of these bounds will be clipped out.
     *
     * @param bounds Return the clip bounds here. If it is null, ignore it but
     *               still return true if the current clip is non-empty.
@@ -792,7 +795,7 @@ public class Canvas {
    }
    
    /**
     * Retrieve the clip bounds.
     * Retrieve the bounds of the current clip (in local coordinates).
     *
     * @return the clip bounds, or [0, 0, 0, 0] if the clip is empty.
     */