diff options
author | Ben Wagner <bungeman@google.com> | 2016-12-16 16:51:41 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-16 19:02:53 +0000 |
commit | 884300dca5531f60535501424bbd86b30e20450a (patch) | |
tree | bd55d2a075890c222fc70dda7043ddfc08967491 /tests | |
parent | 9f67f044dd8765184669af6fd38e7feeff8777f9 (diff) |
Remove SkDynamicMemoryWStream::getOffset.
This method does the same thing as ::bytesWritten but has a confusing
name. It appears there are no external users, so remove it.
Change-Id: I06aed269200c34c2dda36605092f8ea37fcec693
Reviewed-on: https://skia-review.googlesource.com/6188
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PDFGlyphsToUnicodeTest.cpp | 10 | ||||
-rw-r--r-- | tests/PDFOpaqueSrcModeToSrcOverTest.cpp | 4 | ||||
-rw-r--r-- | tests/StreamTest.cpp | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/tests/PDFGlyphsToUnicodeTest.cpp b/tests/PDFGlyphsToUnicodeTest.cpp index a256c93a8d..0d87cd7df2 100644 --- a/tests/PDFGlyphsToUnicodeTest.cpp +++ b/tests/PDFGlyphsToUnicodeTest.cpp @@ -90,7 +90,7 @@ endbfchar\n\ endbfrange\n"; REPORTER_ASSERT(reporter, stream_equals(buffer, 0, expectedResult, - buffer.getOffset())); + buffer.bytesWritten())); // Remove characters and ranges. buffer.reset(); @@ -108,7 +108,7 @@ endbfchar\n\ endbfrange\n"; REPORTER_ASSERT(reporter, stream_equals(buffer, 0, expectedResultChop1, - buffer.getOffset())); + buffer.bytesWritten())); // Remove characters from range to downdrade it to one char. buffer.reset(); @@ -122,7 +122,7 @@ endbfrange\n"; endbfchar\n"; REPORTER_ASSERT(reporter, stream_equals(buffer, 0, expectedResultChop2, - buffer.getOffset())); + buffer.bytesWritten())); buffer.reset(); @@ -139,7 +139,7 @@ endbfrange\n"; REPORTER_ASSERT(reporter, stream_equals(buffer, 0, expectedResultSingleBytes, - buffer.getOffset())); + buffer.bytesWritten())); glyphToUnicode.reset(); glyphsInSubset.reset(); @@ -176,5 +176,5 @@ endbfchar\n\ endbfrange\n"; REPORTER_ASSERT(reporter, stream_equals(buffer2, 0, expectedResult2, - buffer2.getOffset())); + buffer2.bytesWritten())); } diff --git a/tests/PDFOpaqueSrcModeToSrcOverTest.cpp b/tests/PDFOpaqueSrcModeToSrcOverTest.cpp index e15234d090..8b3cfe0e1d 100644 --- a/tests/PDFOpaqueSrcModeToSrcOverTest.cpp +++ b/tests/PDFOpaqueSrcModeToSrcOverTest.cpp @@ -33,7 +33,7 @@ DEF_TEST(SkPDF_OpaqueSrcModeToSrcOver, r) { U8CPU alpha = SK_AlphaOPAQUE; run_test(&srcMode, SkBlendMode::kSrc, alpha); run_test(&srcOverMode, SkBlendMode::kSrcOver, alpha); - REPORTER_ASSERT(r, srcMode.getOffset() == srcOverMode.getOffset()); + REPORTER_ASSERT(r, srcMode.bytesWritten() == srcOverMode.bytesWritten()); // The two PDFs should be equal because they have an opaque alpha. srcMode.reset(); @@ -42,6 +42,6 @@ DEF_TEST(SkPDF_OpaqueSrcModeToSrcOver, r) { alpha = 0x80; run_test(&srcMode, SkBlendMode::kSrc, alpha); run_test(&srcOverMode, SkBlendMode::kSrcOver, alpha); - REPORTER_ASSERT(r, srcMode.getOffset() > srcOverMode.getOffset()); + REPORTER_ASSERT(r, srcMode.bytesWritten() > srcOverMode.bytesWritten()); // The two PDFs should not be equal because they have a non-opaque alpha. } diff --git a/tests/StreamTest.cpp b/tests/StreamTest.cpp index b64de6926f..4b8923f399 100644 --- a/tests/StreamTest.cpp +++ b/tests/StreamTest.cpp @@ -84,7 +84,7 @@ static void TestWStream(skiatest::Reporter* reporter) { for (i = 0; i < 100; i++) { REPORTER_ASSERT(reporter, ds.write(s, 26)); } - REPORTER_ASSERT(reporter, ds.getOffset() == 100 * 26); + REPORTER_ASSERT(reporter, ds.bytesWritten() == 100 * 26); char* dst = new char[100 * 26 + 1]; dst[100*26] = '*'; @@ -97,7 +97,7 @@ static void TestWStream(skiatest::Reporter* reporter) { { std::unique_ptr<SkStreamAsset> stream(ds.detachAsStream()); REPORTER_ASSERT(reporter, 100 * 26 == stream->getLength()); - REPORTER_ASSERT(reporter, ds.getOffset() == 0); + REPORTER_ASSERT(reporter, ds.bytesWritten() == 0); test_loop_stream(reporter, stream.get(), s, 26, 100); std::unique_ptr<SkStreamAsset> stream2(stream->duplicate()); @@ -115,12 +115,12 @@ static void TestWStream(skiatest::Reporter* reporter) { for (i = 0; i < 100; i++) { REPORTER_ASSERT(reporter, ds.write(s, 26)); } - REPORTER_ASSERT(reporter, ds.getOffset() == 100 * 26); + REPORTER_ASSERT(reporter, ds.bytesWritten() == 100 * 26); { // Test that this works after a snapshot. std::unique_ptr<SkStreamAsset> stream(ds.detachAsStream()); - REPORTER_ASSERT(reporter, ds.getOffset() == 0); + REPORTER_ASSERT(reporter, ds.bytesWritten() == 0); test_loop_stream(reporter, stream.get(), s, 26, 100); std::unique_ptr<SkStreamAsset> stream2(stream->duplicate()); |