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

Commit 73fafb38 authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am f6834478: Always render text underline extra. Bug #3381287

* commit 'f6834478':
  Always render text underline extra. Bug #3381287
parents 11a5d424 f6834478
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -1706,12 +1706,17 @@ void OpenGLRenderer::drawTextDecorations(const char* text, int bytesCount, float

        if (underlineWidth > 0.0f) {
            const float textSize = paint->getTextSize();
            const float strokeWidth = textSize * kStdUnderline_Thickness;
            // TODO: Support stroke width < 1.0f when we have AA lines
            const float strokeWidth = fmax(textSize * kStdUnderline_Thickness, 1.0f);

            const float left = x - offsetX;
            float top = 0.0f;

            const int pointsCount = 4 * (flags & SkPaint::kStrikeThruText_Flag ? 2 : 1);
            int linesCount = 0;
            if (flags & SkPaint::kUnderlineText_Flag) linesCount++;
            if (flags & SkPaint::kStrikeThruText_Flag) linesCount++;

            const int pointsCount = 4 * linesCount;
            float points[pointsCount];
            int currentPoint = 0;

+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ void TextureCache::init() {
    mCache.setOnEntryRemovedListener(this);

    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
    LOGD("    Maximum texture dimension is %d pixels", mMaxTextureSize);
    INIT_LOGD("    Maximum texture dimension is %d pixels", mMaxTextureSize);

    mDebugEnabled = readDebugLevel() & kDebugCaches;
}