aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2017-10-12 10:18:44 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-12 14:41:12 +0000
commit5698c8a8a0dcce3bdabab3551f068bda61d741a3 (patch)
treee59206036f7352843b0e33976a19808348b2e127 /src/gpu/text
parent7f9b215695aae262797758b2e2a7b1d35fbe584f (diff)
Batch better in GrSmallPathRenderer and add perspective support.
Minor optimization to text regen also snuck in. Bug: skia: Change-Id: I0c5d97defdcf60b9ce663548c056db0e8bf7149b Reviewed-on: https://skia-review.googlesource.com/57942 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/text')
-rw-r--r--src/gpu/text/GrAtlasTextBlob_regenInOp.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/text/GrAtlasTextBlob_regenInOp.cpp b/src/gpu/text/GrAtlasTextBlob_regenInOp.cpp
index 778c9faabf..ecd8d523c2 100644
--- a/src/gpu/text/GrAtlasTextBlob_regenInOp.cpp
+++ b/src/gpu/text/GrAtlasTextBlob_regenInOp.cpp
@@ -166,6 +166,8 @@ void GrAtlasTextBlob::regenInOp(GrDrawOp::Target* target, GrAtlasGlyphCache* fon
}
bool brokenRun = false;
+ intptr_t vertex = reinterpret_cast<intptr_t>(fVertices);
+ vertex += info->vertexStartIndex();
for (int glyphIdx = 0; glyphIdx < glyphCount; glyphIdx++) {
GrGlyph* glyph = nullptr;
if (regenTexCoords) {
@@ -196,12 +198,10 @@ void GrAtlasTextBlob::regenInOp(GrDrawOp::Target* target, GrAtlasGlyphCache* fon
target->nextDrawToken());
}
- intptr_t vertex = reinterpret_cast<intptr_t>(fVertices);
- vertex += info->vertexStartIndex();
- vertex += vertexStride * glyphIdx * GrAtlasTextOp::kVerticesPerGlyph;
regen_vertices<regenPos, regenCol, regenTexCoords>(vertex, glyph, vertexStride,
info->drawAsDistanceFields(), transX,
transY, color);
+ vertex += vertexStride * GrAtlasTextOp::kVerticesPerGlyph;
helper->incGlyphCount();
}