diff options
author | bungeman <bungeman@google.com> | 2016-08-03 13:32:32 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-03 13:32:32 -0700 |
commit | ffae30db4ade45b469ac3432ec373b6f6daee6e7 (patch) | |
tree | acef6794a40b4525c09301cdf07590dcb4358d5b /tests | |
parent | d1ec89b1aca8f37a460a425259a23275f4d9a81d (diff) |
Convert SkAutoTUnref<SkData> to sk_sp<SkData>.
With the move from SkData::NewXXX to SkData::MakeXXX most
SkAutoTUnref<SkData> were changed to sk_sp<SkData>. However,
there are still a few SkAutoTUnref<SkData> around, so clean
them up.
Review-Url: https://codereview.chromium.org/2212493002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CodecTest.cpp | 4 | ||||
-rw-r--r-- | tests/PDFJpegEmbedTest.cpp | 2 | ||||
-rw-r--r-- | tests/PDFMetadataAttributeTest.cpp | 2 | ||||
-rw-r--r-- | tests/StreamTest.cpp | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp index 7e1b594791..a5df7e3b50 100644 --- a/tests/CodecTest.cpp +++ b/tests/CodecTest.cpp @@ -823,8 +823,8 @@ DEF_TEST(Codec_pngChunkReader, r) { ChunkReader chunkReader(r); // Now read the file with SkCodec. - SkAutoTUnref<SkData> data(wStream.copyToData()); - SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(data, &chunkReader)); + sk_sp<SkData> data(wStream.copyToData()); + SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(data.get(), &chunkReader)); REPORTER_ASSERT(r, codec); if (!codec) { return; diff --git a/tests/PDFJpegEmbedTest.cpp b/tests/PDFJpegEmbedTest.cpp index 6b10f04932..b199c80e75 100644 --- a/tests/PDFJpegEmbedTest.cpp +++ b/tests/PDFJpegEmbedTest.cpp @@ -76,7 +76,7 @@ DEF_TEST(PDFJpegEmbedTest, r) { canvas->flush(); document->endPage(); document->close(); - SkAutoTUnref<SkData> pdfData(pdf.copyToData()); + sk_sp<SkData> pdfData(pdf.copyToData()); SkASSERT(pdfData); pdf.reset(); diff --git a/tests/PDFMetadataAttributeTest.cpp b/tests/PDFMetadataAttributeTest.cpp index 2d43d30d7c..6e7cc248d3 100644 --- a/tests/PDFMetadataAttributeTest.cpp +++ b/tests/PDFMetadataAttributeTest.cpp @@ -29,7 +29,7 @@ DEF_TEST(SkPDF_Metadata, r) { metadata, nullptr, false); doc->beginPage(612.0f, 792.0f); doc->close(); - SkAutoTUnref<SkData> data(pdf.copyToData()); + sk_sp<SkData> data(pdf.copyToData()); static const char* expectations[] = { "/Title (A1)", "/Author (A2)", diff --git a/tests/StreamTest.cpp b/tests/StreamTest.cpp index 50523ff317..56977822b9 100644 --- a/tests/StreamTest.cpp +++ b/tests/StreamTest.cpp @@ -117,7 +117,7 @@ static void TestWStream(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, ds.getOffset() == 100 * 26); { - SkAutoTUnref<SkData> data(ds.copyToData()); + sk_sp<SkData> data(ds.copyToData()); REPORTER_ASSERT(reporter, 100 * 26 == data->size()); REPORTER_ASSERT(reporter, memcmp(dst, data->data(), data->size()) == 0); } @@ -404,7 +404,7 @@ static void stream_copy_test(skiatest::Reporter* reporter, ERRORF(reporter, "SkStreamCopy failed"); return; } - SkAutoTUnref<SkData> data(tgt.copyToData()); + sk_sp<SkData> data(tgt.copyToData()); tgt.reset(); if (data->size() != N) { ERRORF(reporter, "SkStreamCopy incorrect size"); |