aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkGlyphRun.cpp
diff options
context:
space:
mode:
authorGravatar Herb Derby <herb@google.com>2018-07-10 14:41:17 -0400
committerGravatar Herb Derby <herb@google.com>2018-07-10 20:03:09 +0000
commit3c9bfec0d576234345613dd309edb7c0e48d533f (patch)
treef3f8d1a77089b9bedbe5e707991d5bd3ece00f9f /src/core/SkGlyphRun.cpp
parent4b15dc202ff18c81977c85200d48df341938294f (diff)
Add field to directly pass glyphs when using glyph encoding
Change-Id: Iad7c9d7a801c961d2c5965012af16659d55a371c Reviewed-on: https://skia-review.googlesource.com/140340 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkGlyphRun.cpp')
-rw-r--r--src/core/SkGlyphRun.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/SkGlyphRun.cpp b/src/core/SkGlyphRun.cpp
index 426b8fbbcb..e7bab33ad8 100644
--- a/src/core/SkGlyphRun.cpp
+++ b/src/core/SkGlyphRun.cpp
@@ -179,6 +179,9 @@ void SkGlyphRunBuilder::addDenseAndUnique(
glyphIDs = (SkGlyphID*)bytes;
}
+ // TODO: Remove when glyphIds are passed back.
+ fGlyphIDs = glyphIDs;
+
SkASSERT(glyphIDs != nullptr);
if (runSize > 0) {
@@ -203,7 +206,7 @@ void SkGlyphRunBuilder::makeGlyphRun(
std::move(glyphRunPaint),
SkSpan<const uint16_t>{fDenseIndex},
SkSpan<const SkPoint>{fPositions},
- SkSpan<const SkGlyphID>{fScratchGlyphIDs},
+ SkSpan<const SkGlyphID>{fGlyphIDs, SkTo<ptrdiff_t>(fDenseIndex.size())},
SkSpan<const SkGlyphID>{fUniqueGlyphIDs},
text,
clusters