aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkCodecImageGenerator.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-02-15 15:14:16 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-15 20:51:28 +0000
commit185130c643f0f6b20dcf14c200074748be282a7e (patch)
tree049a9162c7ed7c298a4966000b9aa805f75282ad /src/codec/SkCodecImageGenerator.cpp
parenteb62829a83a0a4f4fdd1230a3c08140e38052602 (diff)
return and take SkImageGenerator as unique_ptr
BUG=skia: Change-Id: I4bc11042dd1dbf1eabd40af206027bc65acc3186 Reviewed-on: https://skia-review.googlesource.com/8444 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/codec/SkCodecImageGenerator.cpp')
-rw-r--r--src/codec/SkCodecImageGenerator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/codec/SkCodecImageGenerator.cpp b/src/codec/SkCodecImageGenerator.cpp
index 447332b2c7..56ca21eb76 100644
--- a/src/codec/SkCodecImageGenerator.cpp
+++ b/src/codec/SkCodecImageGenerator.cpp
@@ -6,14 +6,15 @@
*/
#include "SkCodecImageGenerator.h"
+#include "SkMakeUnique.h"
-SkImageGenerator* SkCodecImageGenerator::NewFromEncodedCodec(sk_sp<SkData> data) {
+std::unique_ptr<SkImageGenerator> SkCodecImageGenerator::MakeFromEncodedCodec(sk_sp<SkData> data) {
SkCodec* codec = SkCodec::NewFromData(data);
if (nullptr == codec) {
return nullptr;
}
- return new SkCodecImageGenerator(codec, data);
+ return std::unique_ptr<SkImageGenerator>(new SkCodecImageGenerator(codec, data));
}
static SkImageInfo make_premul(const SkImageInfo& info) {