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

Unified Diff: src/codec/SkCodecImageGenerator.h

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/SkCodec.cpp ('k') | src/codec/SkCodecImageGenerator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodecImageGenerator.h
diff --git a/src/codec/SkCodecImageGenerator.h b/src/codec/SkCodecImageGenerator.h
index b12564329d78279e0a6ef25176f8e7461141bf26..22a39aaaa90e2be07036156e0b99e84f1a2edcf0 100644
--- a/src/codec/SkCodecImageGenerator.h
+++ b/src/codec/SkCodecImageGenerator.h
@@ -14,11 +14,11 @@ public:
/*
* If this data represents an encoded image that we know how to decode,
* return an SkCodecImageGenerator. Otherwise return nullptr.
- *
- * Refs the data if an image generator can be returned. Otherwise does
- * not affect the data.
*/
- static SkImageGenerator* NewFromEncodedCodec(SkData* data);
+ static SkImageGenerator* NewFromEncodedCodec(sk_sp<SkData>);
+ static SkImageGenerator* NewFromEncodedCodec(SkData* data) {
+ return NewFromEncodedCodec(sk_ref_sp(data));
+ }
protected:
SkData* onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) override;
@@ -33,9 +33,8 @@ protected:
private:
/*
* Takes ownership of codec
- * Refs the data
*/
- SkCodecImageGenerator(SkCodec* codec, SkData* data);
+ SkCodecImageGenerator(SkCodec* codec, sk_sp<SkData>);
SkAutoTDelete<SkCodec> fCodec;
sk_sp<SkData> fData;
« no previous file with comments | « src/codec/SkCodec.cpp ('k') | src/codec/SkCodecImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698