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

Unified Diff: src/gpu/text/GrAtlasTextBlob_regenInBatch.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/text/GrAtlasTextBlob.cpp ('k') | src/gpu/text/GrAtlasTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp
diff --git a/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp b/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp
index 14bf4a5d61ef8a6bb40929a916b9ede20c64409c..00a73641aa7ab8902a85e6572824434709afa971 100644
--- a/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp
+++ b/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp
@@ -235,14 +235,18 @@ void GrAtlasTextBlob::regenInBatch(GrDrawBatch::Target* target,
int runIndex, int subRunIndex, SkGlyphCache** cache,
SkTypeface** typeface, GrFontScaler** scaler,
const SkDescriptor** desc, size_t vertexStride,
- GrColor color, SkScalar transX,
- SkScalar transY,
+ const SkMatrix& viewMatrix, SkScalar x, SkScalar y,
+ GrColor color,
void** vertices, size_t* byteCount, int* glyphCount) {
Run& run = fRuns[runIndex];
Run::SubRunInfo& info = run.fSubRunInfo[subRunIndex];
uint64_t currentAtlasGen = fontCache->atlasGeneration(info.maskFormat());
+ // Compute translation if any
+ SkScalar transX, transY;
+ info.computeTranslation(viewMatrix, x, y, &transX, &transY);
+
// Because the GrBatchFontCache may evict the strike a blob depends on using for
// generating its texture coords, we have to track whether or not the strike has
// been abandoned. If it hasn't been abandoned, then we can use the GrGlyph*s as is
« no previous file with comments | « src/gpu/text/GrAtlasTextBlob.cpp ('k') | src/gpu/text/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698