From 42943c8aa9c611c18ad0f1a30a27669f3d82239c Mon Sep 17 00:00:00 2001 From: reed Date: Mon, 12 Sep 2016 12:01:44 -0700 Subject: change SkStreams to work with sk_sp instead of SkData* BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333713002 Review-Url: https://codereview.chromium.org/2333713002 --- tests/PDFDocumentTest.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/PDFDocumentTest.cpp') diff --git a/tests/PDFDocumentTest.cpp b/tests/PDFDocumentTest.cpp index c871375117..afc05e49b8 100644 --- a/tests/PDFDocumentTest.cpp +++ b/tests/PDFDocumentTest.cpp @@ -193,8 +193,8 @@ DEF_TEST(SkPDF_pdfa_document, r) { pdfMetadata, nullptr, /* pdfa = */ true); doc->beginPage(64, 64)->drawColor(SK_ColorRED); doc->close(); - sk_sp data(buffer.copyToData()); - buffer.reset(); + sk_sp data(buffer.detachAsData()); + static const char* expectations[] = { "sRGB IEC61966-2.1", "test document", @@ -212,8 +212,7 @@ DEF_TEST(SkPDF_pdfa_document, r) { pdfMetadata, nullptr, /* pdfa = */ true); doc->beginPage(64, 64)->drawColor(SK_ColorRED); doc->close(); - data.reset(buffer.copyToData()); - buffer.reset(); + data = buffer.detachAsData(); static const char* moreExpectations[] = { "/Producer (phoney library)", -- cgit v1.2.3