diff --git a/src/core/SkGlyphRun.h b/src/core/SkGlyphRun.h index f2ee3c6c40..2b0562b59e 100644 --- a/src/core/SkGlyphRun.h +++ b/src/core/SkGlyphRun.h @@ -102,7 +102,7 @@ public: size_t runSize() const { return fGlyphIDs.size(); } SkSpan positions() const { return fPositions.toConst(); } - SkSpan shuntGlyphsIDs() const { return fGlyphIDs; } + SkSpan glyphsIDs() const { return fGlyphIDs; } const SkPaint& paint() const { return fRunPaint; } SkPaint* mutablePaint() { return &fRunPaint; } SkSpan clusters() const { return fClusters; } diff --git a/src/core/SkGlyphRunPainter.cpp b/src/core/SkGlyphRunPainter.cpp index ef1a10b1a1..61637537e8 100644 --- a/src/core/SkGlyphRunPainter.cpp +++ b/src/core/SkGlyphRunPainter.cpp @@ -87,7 +87,7 @@ void SkGlyphRunListPainter::drawUsingPaths( const SkGlyphRun& glyphRun, SkPoint origin, SkGlyphCache* cache, PerPath perPath) const { const SkPoint* positionCursor = glyphRun.positions().data(); - for (auto glyphID : glyphRun.shuntGlyphsIDs()) { + for (auto glyphID : glyphRun.glyphsIDs()) { SkPoint position = *positionCursor++; const SkGlyph& glyph = cache->getGlyphIDMetrics(glyphID); if (glyph.fWidth > 0) { @@ -151,7 +151,7 @@ void SkGlyphRunListPainter::drawGlyphRunAsSubpixelMask( matrix.mapPoints(fPositions, glyphRun.positions().data(), runSize); const SkPoint* positionCursor = fPositions; - for (auto glyphID : glyphRun.shuntGlyphsIDs()) { + for (auto glyphID : glyphRun.glyphsIDs()) { auto position = *positionCursor++; if (SkScalarsAreFinite(position.fX, position.fY)) { const SkGlyph& glyph = cache->getGlyphMetrics(glyphID, position); @@ -179,7 +179,7 @@ void SkGlyphRunListPainter::drawGlyphRunAsFullpixelMask( matrix.mapPoints(fPositions, glyphRun.positions().data(), runSize); const SkPoint* positionCursor = fPositions; - for (auto glyphID : glyphRun.shuntGlyphsIDs()) { + for (auto glyphID : glyphRun.glyphsIDs()) { auto position = *positionCursor++; if (SkScalarsAreFinite(position.fX, position.fY)) { const SkGlyph& glyph = cache->getGlyphIDMetrics(glyphID); diff --git a/src/core/SkGlyphRunPainter.h b/src/core/SkGlyphRunPainter.h index 5985b17abd..a2e2586732 100644 --- a/src/core/SkGlyphRunPainter.h +++ b/src/core/SkGlyphRunPainter.h @@ -141,7 +141,7 @@ void SkGlyphRunListPainter::drawGlyphRunAsPathWithARGBFallback( SkScalar maxFallbackDimension{-SK_ScalarInfinity}; const SkPoint* positionCursor = glyphRun.positions().data(); - for (auto glyphID : glyphRun.shuntGlyphsIDs()) { + for (auto glyphID : glyphRun.glyphsIDs()) { SkPoint position = *positionCursor++; if (SkScalarsAreFinite(position.x(), position.y())) { const SkGlyph& glyph = pathCache->getGlyphMetrics(glyphID, {0, 0}); @@ -178,7 +178,7 @@ void SkGlyphRunListPainter::drawGlyphRunAsBMPWithPathFallback( if (this->ensureBitmapBuffers(runSize)) { mapping.mapPoints(fPositions, glyphRun.positions().data(), runSize); const SkPoint* mappedPtCursor = fPositions; - for (auto glyphID : glyphRun.shuntGlyphsIDs()) { + for (auto glyphID : glyphRun.glyphsIDs()) { auto mappedPt = *mappedPtCursor++; if (SkScalarsAreFinite(mappedPt.x(), mappedPt.y())) { const SkGlyph& glyph = cache->getGlyphMetrics(glyphID, mappedPt); @@ -210,7 +210,7 @@ void SkGlyphRunListPainter::drawGlyphRunAsSDFWithARGBFallback( SkScalar maxFallbackDimension{-SK_ScalarInfinity}; const SkPoint* positionCursor = glyphRun.positions().data(); - for (auto glyphID : glyphRun.shuntGlyphsIDs()) { + for (auto glyphID : glyphRun.glyphsIDs()) { const SkGlyph& glyph = cache->getGlyphMetrics(glyphID, {0, 0}); SkPoint glyphPos = origin + *positionCursor++; if (glyph.fMaskFormat == SkMask::kSDF_Format || glyph.isEmpty()) { diff --git a/src/pdf/SkClusterator.cpp b/src/pdf/SkClusterator.cpp index f575407e8c..28278101fe 100644 --- a/src/pdf/SkClusterator.cpp +++ b/src/pdf/SkClusterator.cpp @@ -28,7 +28,7 @@ static bool is_reversed(const uint32_t* clusters, uint32_t count) { SkClusterator::SkClusterator(const SkGlyphRun& run) : fClusters(run.clusters().data()) , fUtf8Text(run.text().data()) - , fGlyphCount(SkToU32(run.shuntGlyphsIDs().size())) + , fGlyphCount(SkToU32(run.glyphsIDs().size())) , fTextByteLength(SkToU32(run.text().size())) { if (fClusters) { diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index 4415c34187..20bbcdd411 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -1038,8 +1038,8 @@ void SkPDFDevice::drawGlyphRunAsPath(const SkGlyphRun& glyphRun, SkPoint offset) SkPath path; SkASSERT(paint.getTextEncoding() == SkPaint::kGlyphID_TextEncoding); - paint.getPosTextPath(glyphRun.shuntGlyphsIDs().data(), - glyphRun.shuntGlyphsIDs().size() * sizeof(SkGlyphID), + paint.getPosTextPath(glyphRun.glyphsIDs().data(), + glyphRun.glyphsIDs().size() * sizeof(SkGlyphID), glyphRun.positions().data(), &path); path.offset(offset.x(), offset.y()); @@ -1088,8 +1088,8 @@ static bool needs_new_font(SkPDFFont* font, SkGlyphID gid, SkGlyphCache* cache, void SkPDFDevice::internalDrawGlyphRun(const SkGlyphRun& glyphRun, SkPoint offset) { - const SkGlyphID* glyphs = glyphRun.shuntGlyphsIDs().data(); - uint32_t glyphCount = SkToU32(glyphRun.shuntGlyphsIDs().size()); + const SkGlyphID* glyphs = glyphRun.glyphsIDs().data(); + uint32_t glyphCount = SkToU32(glyphRun.glyphsIDs().size()); SkPaint srcPaint{glyphRun.paint()}; srcPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding); srcPaint.setTextAlign(SkPaint::kLeft_Align); diff --git a/src/svg/SkSVGDevice.cpp b/src/svg/SkSVGDevice.cpp index ffb472381d..f85b9a92a0 100644 --- a/src/svg/SkSVGDevice.cpp +++ b/src/svg/SkSVGDevice.cpp @@ -872,7 +872,7 @@ public: const SkPaint& paint = glyphRun.paint(); auto runSize = glyphRun.runSize(); SkAutoSTArray<64, SkUnichar> unichars(runSize); - paint.glyphsToUnichars(glyphRun.shuntGlyphsIDs().data(), runSize, unichars.get()); + paint.glyphsToUnichars(glyphRun.glyphsIDs().data(), runSize, unichars.get()); auto positions = glyphRun.positions(); for (size_t i = 0; i < runSize; ++i) { this->appendUnichar(unichars[i], positions[i]);