Skip to content

Commit c252595

Browse files
author
Romain Guy
committed
Rename drawGeneralText to drawText
Change-Id: I5062ea5b0605fc7af27f410fafc930d10f38e926
1 parent 33806e2 commit c252595

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

core/jni/android_view_GLES20Canvas.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ static void renderText(OpenGLRenderer* renderer, const jchar* text, int count,
531531
jfloat totalAdvance = value->getTotalAdvance();
532532
const float* positions = value->getPos();
533533
int bytesCount = glyphsCount * sizeof(jchar);
534-
renderer->drawGeneralText((const char*) glyphs, bytesCount, glyphsCount, x, y,
534+
renderer->drawText((const char*) glyphs, bytesCount, glyphsCount, x, y,
535535
positions, paint, totalAdvance);
536536
}
537537

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

libs/hwui/DisplayListRenderer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const char* DisplayList::OP_NAMES[] = {
6363
"DrawPoints",
6464
"DrawTextOnPath",
6565
"DrawPosText",
66-
"DrawGeneralText",
66+
"DrawText",
6767
"ResetShader",
6868
"SetupShader",
6969
"ResetColorFilter",
@@ -593,7 +593,7 @@ void DisplayList::output(OpenGLRenderer& renderer, uint32_t level) {
593593
text.text(), text.length(), count, paint);
594594
}
595595
break;
596-
case DrawGeneralText: {
596+
case DrawText: {
597597
getText(&text);
598598
int count = getInt();
599599
int positionsCount = 0;
@@ -1221,7 +1221,7 @@ status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flag
12211221
positions, paint);
12221222
}
12231223
break;
1224-
case DrawGeneralText: {
1224+
case DrawText: {
12251225
getText(&text);
12261226
int32_t count = getInt();
12271227
float x = getFloat();
@@ -1232,7 +1232,7 @@ status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flag
12321232
float length = getFloat();
12331233
DISPLAY_LIST_LOGD("%s%s %s, %d, %d, %.2f, %.2f, %p, %.2f", (char*) indent,
12341234
OP_NAMES[op], text.text(), text.length(), count, x, y, paint, length);
1235-
drawGlStatus |= renderer.drawGeneralText(text.text(), text.length(), count,
1235+
drawGlStatus |= renderer.drawText(text.text(), text.length(), count,
12361236
x, y, positions, paint, length);
12371237
}
12381238
break;
@@ -1712,7 +1712,7 @@ status_t DisplayListRenderer::drawPosText(const char* text, int bytesCount, int
17121712
return DrawGlInfo::kStatusDone;
17131713
}
17141714

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

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

1736-
uint32_t* location = addOp(DisplayList::DrawGeneralText, reject);
1736+
uint32_t* location = addOp(DisplayList::DrawText, reject);
17371737
addText(text, bytesCount);
17381738
addInt(count);
17391739
addFloat(x);

libs/hwui/DisplayListRenderer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class DisplayList {
105105
DrawPoints,
106106
DrawTextOnPath,
107107
DrawPosText,
108-
DrawGeneralText,
108+
DrawText,
109109
ResetShader,
110110
SetupShader,
111111
ResetColorFilter,
@@ -603,7 +603,7 @@ class DisplayListRenderer: public OpenGLRenderer {
603603
float hOffset, float vOffset, SkPaint* paint);
604604
virtual status_t drawPosText(const char* text, int bytesCount, int count,
605605
const float* positions, SkPaint* paint);
606-
virtual status_t drawGeneralText(const char* text, int bytesCount, int count,
606+
virtual status_t drawText(const char* text, int bytesCount, int count,
607607
float x, float y, const float* positions, SkPaint* paint, float length);
608608

609609
virtual void resetShader();

libs/hwui/OpenGLRenderer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,7 +2421,7 @@ status_t OpenGLRenderer::drawPosText(const char* text, int bytesCount, int count
24212421
return DrawGlInfo::kStatusDrew;
24222422
}
24232423

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

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

libs/hwui/OpenGLRenderer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class OpenGLRenderer {
142142
float hOffset, float vOffset, SkPaint* paint);
143143
virtual status_t drawPosText(const char* text, int bytesCount, int count,
144144
const float* positions, SkPaint* paint);
145-
virtual status_t drawGeneralText(const char* text, int bytesCount, int count, float x, float y,
145+
virtual status_t drawText(const char* text, int bytesCount, int count, float x, float y,
146146
const float* positions, SkPaint* paint, float length = -1.0f);
147147

148148
virtual void resetShader();

0 commit comments

Comments
 (0)