aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
diff options
context:
space:
mode:
authorGravatar Herb Derby <herb@google.com>2018-07-26 16:54:18 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-27 03:13:56 +0000
commitb935cf8e12d7371246d318f20f4ebf88e321573a (patch)
tree4af6fce01d981c24e16c5adfd92680d49199988e /src/pdf
parent5f1dc76d0ceceb97796ec1626e59fe8d4ede581c (diff)
const all the things
Having the glyph run list be const as it passes through the stack means that future change can't be introduced in the device code that changes behavior. Try to force all text changes into the SkGylphRun system. Change-Id: I9412bc094c7adb8554887c725a6264af306e1d42 Reviewed-on: https://skia-review.googlesource.com/143702 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/SkPDFDevice.cpp6
-rw-r--r--src/pdf/SkPDFDevice.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 88955a1b9c..cdaeef0418 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -1386,9 +1386,9 @@ void SkPDFDevice::internalDrawGlyphRun(const SkGlyphRun& glyphRun, SkPoint offse
}
}
-void SkPDFDevice::drawGlyphRunList(SkGlyphRunList* glyphRunList) {
- for (const SkGlyphRun& glyphRun : *glyphRunList) {
- this->internalDrawGlyphRun(glyphRun, glyphRunList->origin());
+void SkPDFDevice::drawGlyphRunList(const SkGlyphRunList& glyphRunList) {
+ for (const SkGlyphRun& glyphRun : glyphRunList) {
+ this->internalDrawGlyphRun(glyphRun, glyphRunList.origin());
}
}
diff --git a/src/pdf/SkPDFDevice.h b/src/pdf/SkPDFDevice.h
index 1ef4a20ed6..2075202cb9 100644
--- a/src/pdf/SkPDFDevice.h
+++ b/src/pdf/SkPDFDevice.h
@@ -98,7 +98,7 @@ public:
void drawPosText(const void* text, size_t len,
const SkScalar pos[], int scalarsPerPos,
const SkPoint& offset, const SkPaint&) override { SkASSERT(false); }
- void drawGlyphRunList(SkGlyphRunList* glyphRunList) override;
+ void drawGlyphRunList(const SkGlyphRunList& glyphRunList) override;
void drawVertices(const SkVertices*, const SkMatrix* bones, int boneCount, SkBlendMode,
const SkPaint&) override;
void drawDevice(SkBaseDevice*, int x, int y,