Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: src/gpu/batches/GrAtlasTextBatch.cpp

Issue 1716443005: Calculate translations to apply to vertices in batch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/batches/GrAtlasTextBatch.h ('k') | src/gpu/text/GrAtlasTextBlob.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAtlasTextBatch.cpp
diff --git a/src/gpu/batches/GrAtlasTextBatch.cpp b/src/gpu/batches/GrAtlasTextBatch.cpp
index 6fea13296931850e8b078de984c2ef6626f30f2f..432322ff7abd3297a2fd7e70484801131a1272bd 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
« no previous file with comments | « src/gpu/batches/GrAtlasTextBatch.h ('k') | src/gpu/text/GrAtlasTextBlob.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698