From d48b7a881b24d7ca2e082f440cac11b784b66e4d Mon Sep 17 00:00:00 2001 From: Herb Derby Date: Mon, 29 Oct 2018 16:39:27 -0400 Subject: [PATCH] Remove uniqueID fields from SkGlyphRun Change-Id: Iaddc62452156231349f56218ab18ee5729f57cb3 Reviewed-on: https://skia-review.googlesource.com/c/166040 Commit-Queue: Herb Derby Commit-Queue: Brian Osman Auto-Submit: Herb Derby Reviewed-by: Brian Osman --- src/core/SkGlyphRun.cpp | 18 +----------------- src/core/SkGlyphRun.h | 4 ---- tests/PDFPrimitivesTest.cpp | 2 -- 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/src/core/SkGlyphRun.cpp b/src/core/SkGlyphRun.cpp index c0d40df5a0133..859ff2e5a427b 100644 --- a/src/core/SkGlyphRun.cpp +++ b/src/core/SkGlyphRun.cpp @@ -30,16 +30,12 @@ static SkTypeface::Encoding convert_encoding(SkPaint::TextEncoding encoding) { // -- SkGlyphRun ----------------------------------------------------------------------------------- SkGlyphRun::SkGlyphRun(const SkPaint& basePaint, const SkRunFont& runFont, - SkSpan denseIndices, SkSpan positions, SkSpan glyphIDs, - SkSpan uniqueGlyphIDs, SkSpan text, SkSpan 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{}, // No dense indices for now. SkSpan{&point, 1}, SkSpan{&glyphID, 1}, - SkSpan{}, SkSpan{}, SkSpan{} }; @@ -198,8 +192,6 @@ void SkGlyphRunBuilder::drawTextAtOrigin( SkRunFont{paint}, glyphIDs, positions, - SkSpan{}, // no dense indices for now., - SkSpan{}, SkSpan{}, SkSpan{}); this->makeGlyphRunList(paint, nullptr, SkPoint::Make(0, 0)); @@ -336,8 +328,6 @@ void SkGlyphRunBuilder::makeGlyphRun( const SkRunFont& runFont, SkSpan glyphIDs, SkSpan positions, - SkSpan uniqueGlyphIDIndices, - SkSpan uniqueGlyphIDs, SkSpan text, SkSpan 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{positions, runSize}, - SkSpan{}, - SkSpan{}, text, clusters); } @@ -435,8 +421,6 @@ void SkGlyphRunBuilder::simplifyDrawPosText( runFont, glyphIDs, SkSpan{pos, runSize}, - SkSpan{}, - SkSpan{}, text, clusters); } diff --git a/src/core/SkGlyphRun.h b/src/core/SkGlyphRun.h index f03942d3ea14e..9f8d2c6a4bd4a 100644 --- a/src/core/SkGlyphRun.h +++ b/src/core/SkGlyphRun.h @@ -87,10 +87,8 @@ class SkGlyphRun { SkGlyphRun() = default; SkGlyphRun(const SkPaint& basePaint, const SkRunFont& runFont, - SkSpan denseIndices, SkSpan positions, SkSpan glyphIDs, - SkSpan uniqueGlyphIDs, SkSpan text, SkSpan clusters); @@ -208,8 +206,6 @@ class SkGlyphRunBuilder { const SkRunFont& runFont, SkSpan glyphIDs, SkSpan positions, - SkSpan uniqueGlyphIDIndices, - SkSpan uniqueGlyphIDs, SkSpan text, SkSpan clusters); diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp index 9b97b03c0c91e..60450ebec5106 100644 --- a/tests/PDFPrimitivesTest.cpp +++ b/tests/PDFPrimitivesTest.cpp @@ -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{}, // No dense indices for now. SkSpan{pos, len}, SkSpan{glyphs, len}, - SkSpan{}, SkSpan{utf8Text, utf8TextByteLength}, SkSpan{clusters, len}); }