From fe8f0e0d3126d27fe9fdd5bc4804392492f14e51 Mon Sep 17 00:00:00 2001 From: halcanary Date: Wed, 27 Jul 2016 14:14:04 -0700 Subject: SkPDF: refactor font subset: fewer copies BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190643002 Review-Url: https://codereview.chromium.org/2190643002 --- tests/PDFPrimitivesTest.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp index 0664ef4065..acfb202097 100644 --- a/tests/PDFPrimitivesTest.cpp +++ b/tests/PDFPrimitivesTest.cpp @@ -100,9 +100,8 @@ static void TestPDFStream(skiatest::Reporter* reporter) { "can do something with it. With shorter strings, " "the short circuit logic cuts in and we end up " "with an uncompressed string."; - SkAutoDataUnref streamData2(SkData::NewWithCopy(streamBytes2, - strlen(streamBytes2))); - sk_sp stream(new SkPDFStream(streamData2.get())); + auto stream = sk_make_sp( + SkData::MakeWithCopy(streamBytes2, strlen(streamBytes2))); SkDynamicMemoryWStream compressedByteStream; SkDeflateWStream deflateWStream(&compressedByteStream); -- cgit v1.2.3