Index: src/codec/SkCodecImageGenerator.cpp |
diff --git a/src/codec/SkCodecImageGenerator.cpp b/src/codec/SkCodecImageGenerator.cpp |
index 1bae1df856e1f5c8ca7a5a02b0ead1ddb72b976f..8108f0de441c64744faf5f6ffe9626798c027356 100644 |
--- a/src/codec/SkCodecImageGenerator.cpp |
+++ b/src/codec/SkCodecImageGenerator.cpp |
@@ -7,7 +7,7 @@ |
#include "SkCodecImageGenerator.h" |
-SkImageGenerator* SkCodecImageGenerator::NewFromEncodedCodec(SkData* data) { |
+SkImageGenerator* SkCodecImageGenerator::NewFromEncodedCodec(sk_sp<SkData> data) { |
SkCodec* codec = SkCodec::NewFromData(data); |
if (nullptr == codec) { |
return nullptr; |
@@ -24,10 +24,10 @@ static SkImageInfo make_premul(const SkImageInfo& info) { |
return info; |
} |
-SkCodecImageGenerator::SkCodecImageGenerator(SkCodec* codec, SkData* data) |
+SkCodecImageGenerator::SkCodecImageGenerator(SkCodec* codec, sk_sp<SkData> data) |
: INHERITED(make_premul(codec->getInfo())) |
, fCodec(codec) |
- , fData(SkRef(data)) |
+ , fData(std::move(data)) |
{} |
SkData* SkCodecImageGenerator::onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) { |