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

Commit 20c2b3ef authored by Tom Hudson's avatar Tom Hudson
Browse files

Fix positioned text bounds

drawPosText() bounds weren't taking their offset into account properly
in absolute-positioned cases.

R=djsollen@google.com
BUG=skia:3673

Change-Id: Ic39fd45491231ed3e3949ffbc1f063a4fc12c3f8
parent ad83f87b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -289,6 +289,7 @@ void SkiaCanvasProxy::onDrawPosText(const void* text, size_t byteLength, const S
    //       but even more conservative bounds if this  is too slow.
    SkRect bounds;
    glyphs.paint.measureText(glyphs.glyphIDs, glyphs.count << 1, &bounds);
    bounds.offset(x, y);

    SK_COMPILE_ASSERT(sizeof(SkPoint) == sizeof(float)*2, SkPoint_is_no_longer_2_floats);
    mCanvas->drawText(glyphs.glyphIDs, &posArray[0].fX, glyphs.count, glyphs.paint, x, y,