diff options
author | 2016-07-27 14:14:04 -0700 | |
---|---|---|
committer | 2016-07-27 14:14:04 -0700 | |
commit | fe8f0e0d3126d27fe9fdd5bc4804392492f14e51 (patch) | |
tree | 2ac3e48fcc781d91809980138c3eab1f00199e4d /tests | |
parent | 151aee4220ae44d5458a41cc2109693a8d285783 (diff) |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PDFPrimitivesTest.cpp | 5 |
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); |