Remove uniqueID fields from SkGlyphRun

Change-Id: Iaddc62452156231349f56218ab18ee5729f57cb3
Reviewed-on: https://skia-review.googlesource.com/c/166040
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
Herb Derby 2018-10-29 16:39:27 -04:00 committed by Skia Commit-Bot
parent 71652e2a09
commit d48b7a881b
3 changed files with 1 additions and 23 deletions

View File

@ -30,16 +30,12 @@ static SkTypeface::Encoding convert_encoding(SkPaint::TextEncoding encoding) {
// -- SkGlyphRun -----------------------------------------------------------------------------------
SkGlyphRun::SkGlyphRun(const SkPaint& basePaint,
const SkRunFont& runFont,
SkSpan<const uint16_t> denseIndices,
SkSpan<const SkPoint> positions,
SkSpan<const SkGlyphID> glyphIDs,
SkSpan<const SkGlyphID> uniqueGlyphIDs,
SkSpan<const char> text,
SkSpan<const uint32_t> clusters)
: fUniqueGlyphIDIndices{denseIndices}
, fPositions{positions}
: fPositions{positions}
, fGlyphIDs{glyphIDs}
, fUniqueGlyphIDs{uniqueGlyphIDs}
, fText{text}
, fClusters{clusters}
, fRunPaint{basePaint, runFont} {}
@ -50,10 +46,8 @@ void SkGlyphRun::eachGlyphToGlyphRun(SkGlyphRun::PerGlyph perGlyph) {
SkGlyphRun run{
fRunPaint,
SkRunFont{fRunPaint},
SkSpan<const uint16_t>{}, // No dense indices for now.
SkSpan<const SkPoint>{&point, 1},
SkSpan<const SkGlyphID>{&glyphID, 1},
SkSpan<const SkGlyphID>{},
SkSpan<const char>{},
SkSpan<const uint32_t>{}
};
@ -198,8 +192,6 @@ void SkGlyphRunBuilder::drawTextAtOrigin(
SkRunFont{paint},
glyphIDs,
positions,
SkSpan<const uint16_t>{}, // no dense indices for now.,
SkSpan<const SkGlyphID>{},
SkSpan<const char>{},
SkSpan<const uint32_t>{});
this->makeGlyphRunList(paint, nullptr, SkPoint::Make(0, 0));
@ -336,8 +328,6 @@ void SkGlyphRunBuilder::makeGlyphRun(
const SkRunFont& runFont,
SkSpan<const SkGlyphID> glyphIDs,
SkSpan<const SkPoint> positions,
SkSpan<const uint16_t> uniqueGlyphIDIndices,
SkSpan<const SkGlyphID> uniqueGlyphIDs,
SkSpan<const char> text,
SkSpan<const uint32_t> clusters) {
@ -346,10 +336,8 @@ void SkGlyphRunBuilder::makeGlyphRun(
fGlyphRunListStorage.emplace_back(
basePaint,
runFont,
uniqueGlyphIDIndices,
positions,
glyphIDs,
uniqueGlyphIDs,
text,
clusters);
}
@ -404,8 +392,6 @@ void SkGlyphRunBuilder::simplifyDrawText(
runFont,
glyphIDs,
SkSpan<const SkPoint>{positions, runSize},
SkSpan<const uint16_t>{},
SkSpan<const SkGlyphID>{},
text,
clusters);
}
@ -435,8 +421,6 @@ void SkGlyphRunBuilder::simplifyDrawPosText(
runFont,
glyphIDs,
SkSpan<const SkPoint>{pos, runSize},
SkSpan<const uint16_t>{},
SkSpan<const SkGlyphID>{},
text,
clusters);
}

View File

@ -87,10 +87,8 @@ public:
SkGlyphRun() = default;
SkGlyphRun(const SkPaint& basePaint,
const SkRunFont& runFont,
SkSpan<const uint16_t> denseIndices,
SkSpan<const SkPoint> positions,
SkSpan<const SkGlyphID> glyphIDs,
SkSpan<const SkGlyphID> uniqueGlyphIDs,
SkSpan<const char> text,
SkSpan<const uint32_t> clusters);
@ -208,8 +206,6 @@ private:
const SkRunFont& runFont,
SkSpan<const SkGlyphID> glyphIDs,
SkSpan<const SkPoint> positions,
SkSpan<const uint16_t> uniqueGlyphIDIndices,
SkSpan<const SkGlyphID> uniqueGlyphIDs,
SkSpan<const char> text,
SkSpan<const uint32_t> clusters);

View File

@ -493,10 +493,8 @@ static SkGlyphRun make_run(size_t len, const SkGlyphID* glyphs, SkPoint* pos,
SkPaint paint, const uint32_t* clusters,
size_t utf8TextByteLength, const char* utf8Text) {
return SkGlyphRun(paint, SkRunFont{paint},
SkSpan<const uint16_t>{}, // No dense indices for now.
SkSpan<const SkPoint>{pos, len},
SkSpan<const SkGlyphID>{glyphs, len},
SkSpan<const SkGlyphID>{},
SkSpan<const char>{utf8Text, utf8TextByteLength},
SkSpan<const uint32_t>{clusters, len});
}