aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/core/SkGlyphRun.cpp5
-rw-r--r--src/core/SkGlyphRun.h1
2 files changed, 5 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
diff --git a/src/core/SkGlyphRun.h b/src/core/SkGlyphRun.h
index d3f8c07cab..7788376c70 100644
--- a/src/core/SkGlyphRun.h
+++ b/src/core/SkGlyphRun.h
@@ -141,6 +141,7 @@ private:
std::vector<uint16_t> fDenseIndex;
std::vector<SkPoint> fPositions;
std::vector<SkGlyphID> fUniqueGlyphIDs;
+ SkGlyphID* fGlyphIDs{nullptr};
// Used as a temporary for preparing using utfN text. This implies that only one run of
// glyph ids will ever be needed because blobs are already glyph based.