Encapsulate color into subrun
Change-Id: I0a9a7e4803348f5e24144f355eeaeb7e8857da18
Reviewed-on: https://skia-review.googlesource.com/c/171042
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp
index e9421ff..f14c728 100644
--- a/src/gpu/text/GrTextBlob.cpp
+++ b/src/gpu/text/GrTextBlob.cpp
@@ -25,7 +25,7 @@
return ((s + (N-1)) / N) * N;
}
-sk_sp<GrTextBlob> GrTextBlob::Make(int glyphCount, int runCount) {
+sk_sp<GrTextBlob> GrTextBlob::Make(int glyphCount, int runCount, GrColor color) {
// We allocate size for the GrTextBlob itself, plus size for the vertices array,
// and size for the glyphIds array.
size_t verticesCount = glyphCount * kVerticesPerGlyph * kMaxVASize;
@@ -52,7 +52,7 @@
// Initialize runs
for (int i = 0; i < runCount; i++) {
- new (&blob->fRuns[i]) GrTextBlob::Run{blob.get()};
+ new (&blob->fRuns[i]) GrTextBlob::Run{blob.get(), color};
}
blob->fRunCountLimit = runCount;
return blob;