aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrAtlasTextBatch.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2016-02-19 14:13:03 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-19 14:13:03 -0800
commit8e0ef294d0fc310432308dc09b8a48a53f7aabc1 (patch)
tree972e07781863d8670d6cebc09a72da355ba47ea1 /src/gpu/batches/GrAtlasTextBatch.cpp
parent3b32bc51f4759d02aca6cd327fcad39f7132a1d1 (diff)
Calculate translations to apply to vertices in batch
Diffstat (limited to 'src/gpu/batches/GrAtlasTextBatch.cpp')
-rw-r--r--src/gpu/batches/GrAtlasTextBatch.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gpu/batches/GrAtlasTextBatch.cpp b/src/gpu/batches/GrAtlasTextBatch.cpp
index 6fea132969..432322ff7a 100644
--- a/src/gpu/batches/GrAtlasTextBatch.cpp
+++ b/src/gpu/batches/GrAtlasTextBatch.cpp
@@ -34,8 +34,8 @@ SkString GrAtlasTextBatch::dumpInfo() const {
str.appendf("%d: Color: 0x%08x Trans: %.2f,%.2f Runs: %d\n",
i,
fGeoData[i].fColor,
- fGeoData[i].fTransX,
- fGeoData[i].fTransY,
+ fGeoData[i].fX,
+ fGeoData[i].fY,
fGeoData[i].fBlob->runCount());
}
@@ -148,10 +148,10 @@ void GrAtlasTextBatch::onPrepareDraws(Target* target) const {
Blob* blob = args.fBlob;
size_t byteCount;
void* blobVertices;
- int glyphCount;
+ int subRunGlyphCount;
blob->regenInBatch(target, fFontCache, &helper, args.fRun, args.fSubRun, &cache,
- &typeface, &scaler, &desc, vertexStride, args.fColor, args.fTransX,
- args.fTransY, &blobVertices, &byteCount, &glyphCount);
+ &typeface, &scaler, &desc, vertexStride, args.fViewMatrix, args.fX,
+ args.fY, args.fColor, &blobVertices, &byteCount, &subRunGlyphCount);
// now copy all vertices
memcpy(currVertex, blobVertices, byteCount);
@@ -161,10 +161,10 @@ void GrAtlasTextBatch::onPrepareDraws(Target* target) const {
SkRect rect;
rect.setLargestInverted();
SkPoint* vertex = (SkPoint*) ((char*)blobVertices);
- rect.growToInclude(vertex, vertexStride, kVerticesPerGlyph * glyphCount);
+ rect.growToInclude(vertex, vertexStride, kVerticesPerGlyph * subRunGlyphCount);
if (this->usesDistanceFields()) {
- fBatch.fViewMatrix.mapRect(&rect);
+ args.fViewMatrix.mapRect(&rect);
}
SkASSERT(fBounds.contains(rect));
#endif