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

Unified Diff: src/gpu/text/GrAtlasTextBlob.cpp

Issue 1605013002: Fix GrAtlasTextBlob bounds management (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanuptext17
Patch Set: fix glprograms Created 4 years, 11 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.h ('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.cpp
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index 05fb5ad415ff16b48633cfd9bdbc51839916d754..bf8f2863baf2964ce58a91c56ed4f4f440ab7cd5 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -63,7 +63,7 @@ void GrAtlasTextBlob::appendGlyph(int runIndex,
subRun->setMaskFormat(format);
- run.fVertexBounds.joinNonEmptyArg(positions);
+ subRun->joinGlyphBounds(positions);
subRun->setColor(color);
intptr_t vertex = reinterpret_cast<intptr_t>(this->fVertices + subRun->vertexEndIndex());
@@ -219,7 +219,6 @@ bool GrAtlasTextBlob::mustRegenerate(SkScalar* outTransX, SkScalar* outTransY,
(*outTransY) = y - fY;
}
-
// If we can reuse the blob, then make sure we update the blob's viewmatrix, and x/y
// offsets. Note, we offset the vertex bounds right before flushing
fViewMatrix = viewMatrix;
@@ -383,7 +382,6 @@ void GrAtlasTextBlob::flushCached(GrContext* context,
drawFilter, viewMatrix, clipBounds, x, y);
continue;
}
- fRuns[run].fVertexBounds.offset(transX, transY);
this->flushRun(dc, &pipelineBuilder, run, color,
transX, transY, skPaint, props,
distanceAdjustTable, context->getBatchFontCache());
@@ -419,8 +417,8 @@ GrDrawBatch* GrAtlasTextBlob::test_createBatch(
const SkPaint& skPaint, const SkSurfaceProps& props,
const GrDistanceFieldAdjustTable* distanceAdjustTable,
GrBatchFontCache* cache) {
- const GrAtlasTextBlob::Run::SubRunInfo& info = fRuns[0].fSubRunInfo[0];
- return this->createBatch(info, glyphCount, 0, 0, color, transX, transY, skPaint,
+ const GrAtlasTextBlob::Run::SubRunInfo& info = fRuns[run].fSubRunInfo[subRun];
+ return this->createBatch(info, glyphCount, run, subRun, color, transX, transY, skPaint,
props, distanceAdjustTable, cache);
}
« no previous file with comments | « src/gpu/text/GrAtlasTextBlob.h ('k') | src/gpu/text/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698