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

Commit c2525951 authored by Romain Guy's avatar Romain Guy
Browse files

Rename drawGeneralText to drawText

Change-Id: I5062ea5b0605fc7af27f410fafc930d10f38e926
parent 33806e25
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -531,7 +531,7 @@ static void renderText(OpenGLRenderer* renderer, const jchar* text, int count,
    jfloat totalAdvance = value->getTotalAdvance();
    const float* positions = value->getPos();
    int bytesCount = glyphsCount * sizeof(jchar);
    renderer->drawGeneralText((const char*) glyphs, bytesCount, glyphsCount, x, y,
    renderer->drawText((const char*) glyphs, bytesCount, glyphsCount, x, y,
            positions, paint, totalAdvance);
}

@@ -562,7 +562,7 @@ static void renderTextRun(OpenGLRenderer* renderer, const jchar* text,
    jfloat totalAdvance = value->getTotalAdvance();
    const float* positions = value->getPos();
    int bytesCount = glyphsCount * sizeof(jchar);
    renderer->drawGeneralText((const char*) glyphs, bytesCount, glyphsCount, x, y,
    renderer->drawText((const char*) glyphs, bytesCount, glyphsCount, x, y,
            positions, paint, totalAdvance);
}

+6 −6
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ const char* DisplayList::OP_NAMES[] = {
    "DrawPoints",
    "DrawTextOnPath",
    "DrawPosText",
    "DrawGeneralText",
    "DrawText",
    "ResetShader",
    "SetupShader",
    "ResetColorFilter",
@@ -593,7 +593,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) {
                        text.text(), text.length(), count, paint);
            }
            break;
            case DrawGeneralText: {
            case DrawText: {
                getText(&text);
                int count = getInt();
                int positionsCount = 0;
@@ -1221,7 +1221,7 @@ status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flag
                        positions, paint);
            }
            break;
            case DrawGeneralText: {
            case DrawText: {
                getText(&text);
                int32_t count = getInt();
                float x = getFloat();
@@ -1232,7 +1232,7 @@ status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flag
                float length = getFloat();
                DISPLAY_LIST_LOGD("%s%s %s, %d, %d, %.2f, %.2f, %p, %.2f", (char*) indent,
                        OP_NAMES[op], text.text(), text.length(), count, x, y, paint, length);
                drawGlStatus |= renderer.drawGeneralText(text.text(), text.length(), count,
                drawGlStatus |= renderer.drawText(text.text(), text.length(), count,
                        x, y, positions, paint, length);
            }
            break;
@@ -1712,7 +1712,7 @@ status_t DisplayListRenderer::drawPosText(const char* text, int bytesCount, int
    return DrawGlInfo::kStatusDone;
}

status_t DisplayListRenderer::drawGeneralText(const char* text, int bytesCount, int count,
status_t DisplayListRenderer::drawText(const char* text, int bytesCount, int count,
        float x, float y, const float* positions, SkPaint* paint, float length) {
    if (!text || count <= 0) return DrawGlInfo::kStatusDone;

@@ -1733,7 +1733,7 @@ status_t DisplayListRenderer::drawGeneralText(const char* text, int bytesCount,
        reject = quickReject(x, y + metrics.fTop, x + length, y + metrics.fBottom);
    }

    uint32_t* location = addOp(DisplayList::DrawGeneralText, reject);
    uint32_t* location = addOp(DisplayList::DrawText, reject);
    addText(text, bytesCount);
    addInt(count);
    addFloat(x);
+2 −2
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ public:
        DrawPoints,
        DrawTextOnPath,
        DrawPosText,
        DrawGeneralText,
        DrawText,
        ResetShader,
        SetupShader,
        ResetColorFilter,
@@ -603,7 +603,7 @@ public:
            float hOffset, float vOffset, SkPaint* paint);
    virtual status_t drawPosText(const char* text, int bytesCount, int count,
            const float* positions, SkPaint* paint);
    virtual status_t drawGeneralText(const char* text, int bytesCount, int count,
    virtual status_t drawText(const char* text, int bytesCount, int count,
            float x, float y, const float* positions, SkPaint* paint, float length);

    virtual void resetShader();
+2 −2
Original line number Diff line number Diff line
@@ -2421,7 +2421,7 @@ status_t OpenGLRenderer::drawPosText(const char* text, int bytesCount, int count
    return DrawGlInfo::kStatusDrew;
}

status_t OpenGLRenderer::drawGeneralText(const char* text, int bytesCount, int count,
status_t OpenGLRenderer::drawText(const char* text, int bytesCount, int count,
        float x, float y, const float* positions, SkPaint* paint, float length) {
    if (text == NULL || count == 0 || mSnapshot->isIgnored() ||
            (paint->getAlpha() * mSnapshot->alpha == 0 && paint->getXfermode() == NULL)) {
@@ -2455,7 +2455,7 @@ status_t OpenGLRenderer::drawGeneralText(const char* text, int bytesCount, int c
    }

#if DEBUG_GLYPHS
    ALOGD("OpenGLRenderer drawGeneralText() with FontID=%d",
    ALOGD("OpenGLRenderer drawText() with FontID=%d",
            SkTypeface::UniqueID(paint->getTypeface()));
#endif

+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ public:
            float hOffset, float vOffset, SkPaint* paint);
    virtual status_t drawPosText(const char* text, int bytesCount, int count,
            const float* positions, SkPaint* paint);
    virtual status_t drawGeneralText(const char* text, int bytesCount, int count, float x, float y,
    virtual status_t drawText(const char* text, int bytesCount, int count, float x, float y,
            const float* positions, SkPaint* paint, float length = -1.0f);

    virtual void resetShader();