aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
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 /tests
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 'tests')
-rw-r--r--tests/GlyphRunTest.cpp4
-rw-r--r--tests/PDFPrimitivesTest.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/GlyphRunTest.cpp b/tests/GlyphRunTest.cpp
index 49d7340aca..9cd9c4ff83 100644
--- a/tests/GlyphRunTest.cpp
+++ b/tests/GlyphRunTest.cpp
@@ -86,9 +86,9 @@ DEF_TEST(GlyphRunBlob, reporter) {
auto runList = runBuilder.useGlyphRunList();
- REPORTER_ASSERT(reporter, runList->size() == runCount);
+ REPORTER_ASSERT(reporter, runList.size() == runCount);
int runIndex = 0;
- for (auto& run : *runList) {
+ for (auto& run : runList) {
REPORTER_ASSERT(reporter, run.runSize() == count);
int index = 0;
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index adbfdc763c..a9214ff948 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -494,7 +494,7 @@ static SkGlyphRun make_run(size_t len, const SkGlyphID* glyphs, SkPoint* pos,
size_t utf8TextByteLength, const char* utf8Text) {
return SkGlyphRun(std::move(paint),
SkSpan<const uint16_t>{}, // No dense indices for now.
- SkSpan<SkPoint>{pos, len},
+ SkSpan<const SkPoint>{pos, len},
SkSpan<const SkGlyphID>{glyphs, len},
SkSpan<const SkGlyphID>{},
SkSpan<const char>{utf8Text, utf8TextByteLength},