Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: src/codec/SkCodecImageGenerator.cpp

Issue 2333713002: change SkStreams to work with sk_sp<SkData> instead of SkData* (Closed)
Patch Set: fix xpsdevice Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/codec/SkCodecImageGenerator.h ('k') | src/core/SkStream.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/codec/SkCodecImageGenerator.h ('k') | src/core/SkStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698