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
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 0664ef4..acfb202 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -100,9 +100,8 @@
"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<SkPDFStream> stream(new SkPDFStream(streamData2.get()));
+ auto stream = sk_make_sp<SkPDFStream>(
+ SkData::MakeWithCopy(streamBytes2, strlen(streamBytes2)));
SkDynamicMemoryWStream compressedByteStream;
SkDeflateWStream deflateWStream(&compressedByteStream);