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

Commit 2b2c7f1e authored by Stan Iliev's avatar Stan Iliev Committed by Android (Google) Code Review
Browse files

Merge "Fix bound rectangle calculation in SkiaCanvasProxy::onDrawPosText"

parents 57c10a24 d84d2ee3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -324,9 +324,9 @@ void SkiaCanvasProxy::onDrawPosText(const void* text, size_t byteLength, const S
    // by Minikin then it had already computed these bounds.  Unfortunately,
    // there is no way to capture those bounds as part of the Skia drawPosText
    // API so we need to do that computation again here.
    SkRect bounds;
    SkRect bounds = SkRect::MakeEmpty();
    for (int i = 0; i < glyphs.count; i++) {
        SkRect glyphBounds;
        SkRect glyphBounds = SkRect::MakeEmpty();
        glyphs.paint.measureText(&glyphs.glyphIDs[i], sizeof(uint16_t), &glyphBounds);
        glyphBounds.offset(pos[i].fX, pos[i].fY);
        bounds.join(glyphBounds);