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() {} |