diff options
author | Herb Derby <herb@google.com> | 2018-10-25 12:27:07 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-10-25 17:34:50 +0000 |
commit | aedc9d2add9c878e0e5f89381710ae090a63a4cf (patch) | |
tree | eeee265c99199a27babdfc1a3112286f6c6505f6 /src | |
parent | ee4519d042feb72573f4f66b024ea9eb636700d9 (diff) | |
download | skqp-aedc9d2add9c878e0e5f89381710ae090a63a4cf.tar.gz |
Rename shuntGlyphIDs to glyphIDs
This is no longer temporary. glyphIDs are the
wave of the future.
Change-Id: I161367a989c409d96791c554bdb88cdce110bf2b
Reviewed-on: https://skia-review.googlesource.com/c/165022
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkGlyphRun.h | 2 | ||||
-rw-r--r-- | src/core/SkGlyphRunPainter.cpp | 6 | ||||
-rw-r--r-- | src/core/SkGlyphRunPainter.h | 6 | ||||
-rw-r--r-- | src/pdf/SkClusterator.cpp | 2 | ||||
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 8 | ||||
-rw-r--r-- | src/svg/SkSVGDevice.cpp | 2 |
6 files changed, 13 insertions, 13 deletions
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<const SkPoint> positions() const { return fPositions.toConst(); } - SkSpan<const SkGlyphID> shuntGlyphsIDs() const { return fGlyphIDs; } + SkSpan<const SkGlyphID> glyphsIDs() const { return fGlyphIDs; } const SkPaint& paint() const { return fRunPaint; } SkPaint* mutablePaint() { return &fRunPaint; } SkSpan<const uint32_t> 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]); |