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

Unified Diff: src/gpu/GrAtlasTextBlob.h

Issue 1508853005: A small text cleanup (Closed) Base URL: https://skia.googlesource.com/skia.git@lcdcolorverts
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/GrAtlasTextBlob.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextBlob.h
diff --git a/src/gpu/GrAtlasTextBlob.h b/src/gpu/GrAtlasTextBlob.h
index 0d414b4242c03c4f0009f506a50deac6ffe30c0c..6f92c1efebc8666e988806d5b8a93d67ad754f8b 100644
--- a/src/gpu/GrAtlasTextBlob.h
+++ b/src/gpu/GrAtlasTextBlob.h
@@ -280,12 +280,27 @@ struct GrAtlasTextBlob : public SkNVRefCnt<GrAtlasTextBlob> {
}
}
- void appendGlyph(Run* run,
- Run::SubRunInfo* subRun,
- const SkRect& positions, GrColor color,
- size_t vertexStride, bool useVertexColor,
+ void appendGlyph(int runIndex,
+ const SkRect& positions,
+ GrColor color,
+ GrBatchTextStrike* strike,
GrGlyph* glyph);
+ static size_t GetVertexStride(GrMaskFormat maskFormat) {
+ switch (maskFormat) {
+ case kA8_GrMaskFormat:
+ return kGrayTextVASize;
+ case kARGB_GrMaskFormat:
+ return kColorTextVASize;
+ default:
+ return kLCDTextVASize;
+ }
+ }
+
+ // position + local coord
+ static const size_t kColorTextVASize = sizeof(SkPoint) + sizeof(SkIPoint16);
+ static const size_t kGrayTextVASize = sizeof(SkPoint) + sizeof(GrColor) + sizeof(SkIPoint16);
+ static const size_t kLCDTextVASize = kGrayTextVASize;
static const int kVerticesPerGlyph = 4;
#ifdef CACHE_SANITY_CHECK
« no previous file with comments | « no previous file | src/gpu/GrAtlasTextBlob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698