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

Unified Diff: include/codec/SkCodec.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 | « include/codec/SkAndroidCodec.h ('k') | include/core/SkStream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/codec/SkCodec.h
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h
index ced0c630e0816a1088bf1ec7f934a8c7e8548030..bee4f3c9107ec7c749c6a6033766351a51171960 100644
--- a/include/codec/SkCodec.h
+++ b/include/codec/SkCodec.h
@@ -95,10 +95,11 @@ public:
* failure to decode the image.
* If the PNG does not contain unknown chunks, the SkPngChunkReader
* will not be used or modified.
- *
- * Will take a ref if it returns a codec, else will not affect the data.
*/
- static SkCodec* NewFromData(SkData*, SkPngChunkReader* = NULL);
+ static SkCodec* NewFromData(sk_sp<SkData>, SkPngChunkReader* = NULL);
+ static SkCodec* NewFromData(SkData* data, SkPngChunkReader* reader) {
+ return NewFromData(sk_ref_sp(data), reader);
+ }
virtual ~SkCodec();
« no previous file with comments | « include/codec/SkAndroidCodec.h ('k') | include/core/SkStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698