aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-07-27 14:14:04 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-27 14:14:04 -0700
commitfe8f0e0d3126d27fe9fdd5bc4804392492f14e51 (patch)
tree2ac3e48fcc781d91809980138c3eab1f00199e4d /tests
parent151aee4220ae44d5458a41cc2109693a8d285783 (diff)
SkPDF: refactor font subset: fewer copies
Diffstat (limited to 'tests')
-rw-r--r--tests/PDFPrimitivesTest.cpp5
1 files changed, 2 insertions, 3 deletions
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<SkPDFStream> stream(new SkPDFStream(streamData2.get()));
+ auto stream = sk_make_sp<SkPDFStream>(
+ SkData::MakeWithCopy(streamBytes2, strlen(streamBytes2)));
SkDynamicMemoryWStream compressedByteStream;
SkDeflateWStream deflateWStream(&compressedByteStream);