diff options
author | Mike Reed <reed@google.com> | 2017-07-23 15:30:02 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-25 15:35:23 +0000 |
commit | ede7bac43fbc69b9fdf1c178890ba6353f5bb140 (patch) | |
tree | dccdba46e7abf125e2f90e6dc08eca00ad9cb09b /tests/CodecExactReadTest.cpp | |
parent | fa3ed03720b5083afd3620c9239863f05f2eedbd (diff) |
use unique_ptr for codec factories
Will need guards for android (at least)
Bug: skia:
Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947
Reviewed-on: https://skia-review.googlesource.com/26040
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tests/CodecExactReadTest.cpp')
-rw-r--r-- | tests/CodecExactReadTest.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/CodecExactReadTest.cpp b/tests/CodecExactReadTest.cpp index 9b6acc8bc9..d00c0bcf97 100644 --- a/tests/CodecExactReadTest.cpp +++ b/tests/CodecExactReadTest.cpp @@ -11,6 +11,7 @@ #include "SkBitmap.h" #include "SkCodec.h" #include "SkData.h" +#include "SkMakeUnique.h" #include "SkStream.h" namespace { @@ -67,7 +68,8 @@ DEF_TEST(Codec_end, r) { SkMemoryStream stream(std::move(multiData)); for (int i = 0; i < kNumImages; ++i) { - std::unique_ptr<SkCodec> codec(SkCodec::NewFromStream(new UnowningStream(&stream))); + std::unique_ptr<SkCodec> codec(SkCodec::MakeFromStream( + skstd::make_unique<UnowningStream>(&stream))); if (!codec) { ERRORF(r, "Failed to create a codec from %s, iteration %i", path, i); continue; |