Index: include/codec/SkCodec.h |
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h |
index d90fea8cedcf6d92ecdc8535e71962faaa376689..dffab6b3779207aeba99084810afb27d8416a097 100644 |
--- a/include/codec/SkCodec.h |
+++ b/include/codec/SkCodec.h |
@@ -17,6 +17,7 @@ |
#include "SkTypes.h" |
class SkData; |
+class SkPngChunkReader; |
class SkSampler; |
/** |
@@ -28,18 +29,24 @@ public: |
* If this stream represents an encoded image that we know how to decode, |
* return an SkCodec 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. |
+ * |
* 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 SkCodec* NewFromStream(SkStream*); |
+ static SkCodec* NewFromStream(SkStream*, SkPngChunkReader* = NULL); |
/** |
* If this data represents an encoded image that we know how to decode, |
* return an SkCodec 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 SkCodec* NewFromData(SkData*); |
+ static SkCodec* NewFromData(SkData*, SkPngChunkReader* = NULL); |
virtual ~SkCodec(); |