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

Unified Diff: include/codec/SkAndroidCodec.h

Issue 1487583003: Allow SkAndroidCodec to use SkPngChunkReader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | src/codec/SkAndroidCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/codec/SkAndroidCodec.h
diff --git a/include/codec/SkAndroidCodec.h b/include/codec/SkAndroidCodec.h
index e33116f9ba0c52f1fc665b34bcaf88a586c86ce0..5f1c16418dcc73a3e00a4f167a8462b202555162 100644
--- a/include/codec/SkAndroidCodec.h
+++ b/include/codec/SkAndroidCodec.h
@@ -23,18 +23,24 @@ public:
* If this stream represents an encoded image that we know how to decode,
* return an SkAndroidCodec that can decode it. Otherwise return NULL.
*
+ * If SkPngChunkReader is not NULL, take a ref and pass it to libpng if
+ * the image is a png.
djsollen 2015/11/30 15:42:22 what is the expected behavior if you pass in a chu
msarett 2015/11/30 15:44:33 Me too. Leon, can you confirm?
scroggo 2015/11/30 15:55:09 If the image is not a PNG, no ref is taken. If it
djsollen 2015/11/30 15:58:47 Can you update the comment in SkCodec? I'm fine i
+ *
* If NULL is returned, the stream is deleted immediately. Otherwise, the
* SkCodec takes ownership of it, and will delete it when done with it.
*/
- static SkAndroidCodec* NewFromStream(SkStream*);
+ static SkAndroidCodec* NewFromStream(SkStream*, SkPngChunkReader* = NULL);
/**
* If this data represents an encoded image that we know how to decode,
* return an SkAndroidCodec that can decode it. Otherwise return NULL.
*
+ * If SkPngChunkReader is not NULL, take a ref and pass it to libpng if
+ * the image is a png.
+ *
* Will take a ref if it returns a codec, else will not affect the data.
*/
- static SkAndroidCodec* NewFromData(SkData*);
+ static SkAndroidCodec* NewFromData(SkData*, SkPngChunkReader* = NULL);
virtual ~SkAndroidCodec() {}
« no previous file with comments | « no previous file | src/codec/SkAndroidCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698