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/GifTest.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/GifTest.cpp')
-rw-r--r-- | tests/GifTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/GifTest.cpp b/tests/GifTest.cpp index 5749df1be5..daa5cf56d0 100644 --- a/tests/GifTest.cpp +++ b/tests/GifTest.cpp @@ -195,7 +195,7 @@ DEF_TEST(Gif, reporter) { // Likewise, incremental decoding should succeed here. { sk_sp<SkData> data = SkData::MakeWithoutCopy(gGIFDataNoColormap, 31); - std::unique_ptr<SkCodec> codec(SkCodec::NewFromData(data)); + std::unique_ptr<SkCodec> codec(SkCodec::MakeFromData(data)); REPORTER_ASSERT(reporter, codec); if (codec) { auto info = codec->getInfo().makeColorType(kN32_SkColorType); @@ -232,7 +232,7 @@ DEF_TEST(Gif_Sampled, r) { return; } - std::unique_ptr<SkAndroidCodec> codec(SkAndroidCodec::NewFromStream(stream.release())); + std::unique_ptr<SkAndroidCodec> codec(SkAndroidCodec::MakeFromStream(std::move(stream))); REPORTER_ASSERT(r, codec); if (!codec) { return; @@ -258,7 +258,7 @@ DEF_TEST(Codec_GifTruncated, r) { // This is right before the header for the first image. data = SkData::MakeSubset(data.get(), 0, 446); - std::unique_ptr<SkCodec> codec(SkCodec::NewFromData(data)); + std::unique_ptr<SkCodec> codec(SkCodec::MakeFromData(data)); REPORTER_ASSERT(r, !codec); } @@ -270,7 +270,7 @@ DEF_TEST(Codec_GifTruncated2, r) { // This is after the header, but before the color table. data = SkData::MakeSubset(data.get(), 0, 23); - std::unique_ptr<SkCodec> codec(SkCodec::NewFromData(data)); + std::unique_ptr<SkCodec> codec(SkCodec::MakeFromData(data)); if (!codec) { ERRORF(r, "Failed to create codec with partial data"); return; |