Skip to content

Commit

Permalink
Remove uniqueID fields from SkGlyphRun
Browse files Browse the repository at this point in the history
Change-Id: Iaddc62452156231349f56218ab18ee5729f57cb3
Reviewed-on: https://skia-review.googlesource.com/c/166040
Commit-Queue: Herb Derby <[email protected]>
Commit-Queue: Brian Osman <[email protected]>
Auto-Submit: Herb Derby <[email protected]>
Reviewed-by: Brian Osman <[email protected]>
  • Loading branch information
herbderby authored and Skia Commit-Bot committed Oct 29, 2018
1 parent 71652e2 commit d48b7a8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
18 changes: 1 addition & 17 deletions src/core/SkGlyphRun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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} {}
Expand All @@ -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>{}
};
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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) {

Expand All @@ -346,10 +336,8 @@ void SkGlyphRunBuilder::makeGlyphRun(
fGlyphRunListStorage.emplace_back(
basePaint,
runFont,
uniqueGlyphIDIndices,
positions,
glyphIDs,
uniqueGlyphIDs,
text,
clusters);
}
Expand Down Expand Up @@ -404,8 +392,6 @@ void SkGlyphRunBuilder::simplifyDrawText(
runFont,
glyphIDs,
SkSpan<const SkPoint>{positions, runSize},
SkSpan<const uint16_t>{},
SkSpan<const SkGlyphID>{},
text,
clusters);
}
Expand Down Expand Up @@ -435,8 +421,6 @@ void SkGlyphRunBuilder::simplifyDrawPosText(
runFont,
glyphIDs,
SkSpan<const SkPoint>{pos, runSize},
SkSpan<const uint16_t>{},
SkSpan<const SkGlyphID>{},
text,
clusters);
}
4 changes: 0 additions & 4 deletions src/core/SkGlyphRun.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,8 @@ class SkGlyphRun {
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);

Expand Down Expand Up @@ -208,8 +206,6 @@ class SkGlyphRunBuilder {
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);

Expand Down
2 changes: 0 additions & 2 deletions tests/PDFPrimitivesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}
Expand Down

0 comments on commit d48b7a8

Please sign in to comment.