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

Commit 49cc5d71 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Handle all text bounds as post-translated"

parents 3e0a4633 f09b746a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -602,6 +602,7 @@ static void renderText(OpenGLRenderer* renderer, const jchar* text, int count,
    int bytesCount = glyphsCount * sizeof(jchar);
    const SkRect& r = value->getBounds();
    android::uirenderer::Rect bounds(r.fLeft, r.fTop, r.fRight, r.fBottom);
    bounds.translate(x, y);

    renderer->drawText((const char*) glyphs, bytesCount, glyphsCount,
            x + xOffsetForTextAlign(paint, totalAdvance), y, positions,
@@ -637,6 +638,7 @@ static void renderTextRun(OpenGLRenderer* renderer, const jchar* text,
    int bytesCount = glyphsCount * sizeof(jchar);
    const SkRect& r = value->getBounds();
    android::uirenderer::Rect bounds(r.fLeft, r.fTop, r.fRight, r.fBottom);
    bounds.translate(x, y);

    renderer->drawText((const char*) glyphs, bytesCount, glyphsCount,
            x + xOffsetForTextAlign(paint, totalAdvance), y, positions,
+0 −1
Original line number Diff line number Diff line
@@ -1295,7 +1295,6 @@ public:
            const float* positions, SkPaint* paint, float totalAdvance, const Rect& bounds)
            : DrawBoundedOp(bounds, paint), mText(text), mBytesCount(bytesCount), mCount(count),
            mX(x), mY(y), mPositions(positions), mTotalAdvance(totalAdvance) {
        mLocalBounds.translate(x,y);
        memset(&mPrecacheTransform.data[0], 0xff, 16 * sizeof(float));
    }