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

Commit de0ca31e authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Draw text decorations correctly."

parents 9889e2b1 3a3fa1be
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1116,6 +1116,8 @@ void OpenGLRenderer::drawText(const char* text, int bytesCount, int count,
    }

    // TODO: Handle paint->getTextScaleX()
    const float oldX = x;
    const float oldY = y;
    const bool pureTranslate = mSnapshot->transform->isPureTranslate();
    if (pureTranslate) {
        x = (int) floorf(x + mSnapshot->transform->getTranslateX() + 0.5f);
@@ -1194,7 +1196,7 @@ void OpenGLRenderer::drawText(const char* text, int bytesCount, int count,
    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
    glDisableVertexAttribArray(mCaches.currentProgram->getAttrib("texCoords"));

    drawTextDecorations(text, bytesCount, length, x, y, paint);
    drawTextDecorations(text, bytesCount, length, oldX, oldY, paint);
}

void OpenGLRenderer::drawPath(SkPath* path, SkPaint* paint) {