Index: tests/PDFJpegEmbedTest.cpp |
diff --git a/tests/PDFJpegEmbedTest.cpp b/tests/PDFJpegEmbedTest.cpp |
index 93c204401d1d7aae1b8435ff150e2dfcebd8ca27..2e75c3998af752f61c7037485e3d922f9294751a 100644 |
--- a/tests/PDFJpegEmbedTest.cpp |
+++ b/tests/PDFJpegEmbedTest.cpp |
@@ -78,9 +78,8 @@ DEF_TEST(SkPDF_JpegEmbedTest, r) { |
canvas->flush(); |
document->endPage(); |
document->close(); |
- sk_sp<SkData> pdfData(pdf.copyToData()); |
+ sk_sp<SkData> pdfData(pdf.detachAsData()); |
SkASSERT(pdfData); |
- pdf.reset(); |
REPORTER_ASSERT(r, is_subset_of(mandrillData.get(), pdfData.get())); |
@@ -102,9 +101,8 @@ DEF_TEST(SkPDF_JpegEmbedTest, r) { |
canvas->flush(); |
document->endPage(); |
document->close(); |
- pdfData.reset(pdf.copyToData()); |
+ pdfData = pdf.detachAsData(); |
SkASSERT(pdfData); |
- pdf.reset(); |
REPORTER_ASSERT(r, is_subset_of(mandrillData.get(), pdfData.get())); |