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

Unified Diff: src/gpu/GrAtlasTextContext.cpp

Issue 1514563002: Revert of Allow LCD text to batch across colorchanges. This will always use (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 | « no previous file | src/gpu/batches/GrAtlasTextBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextContext.cpp
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index fbbcdb68c47b74beb86e483fc0cadc20e0a35490..50238574262ebb043f5437a06852e53b40f895ea 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -1014,8 +1014,7 @@
r.fRight = r.fLeft + SkIntToScalar(width);
r.fBottom = r.fTop + SkIntToScalar(height);
subRun->setMaskFormat(format);
- blob->appendGlyph(&run, subRun, r, color, vertexStride,
- kARGB_GrMaskFormat != format, glyph);
+ blob->appendGlyph(&run, subRun, r, color, vertexStride, kA8_GrMaskFormat == format, glyph);
}
bool GrAtlasTextContext::dfAppendGlyph(GrAtlasTextBlob* blob, int runIndex,
@@ -1071,9 +1070,11 @@
SkASSERT(glyph->fMaskFormat == kA8_GrMaskFormat);
subRun->setMaskFormat(kA8_GrMaskFormat);
- size_t vertexStride = GrAtlasTextBatch::GetVertexStride(kA8_GrMaskFormat);
-
- blob->appendGlyph(&run, subRun, glyphRect, color, vertexStride, true, glyph);
+ size_t vertexStride = GrAtlasTextBatch::GetVertexStrideDf(kA8_GrMaskFormat,
+ subRun->hasUseLCDText());
+
+ bool useColorVerts = !subRun->hasUseLCDText();
+ blob->appendGlyph(&run, subRun, glyphRect, color, vertexStride, useColorVerts, glyph);
return true;
}
« no previous file with comments | « no previous file | src/gpu/batches/GrAtlasTextBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698