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

Unified Diff: include/codec/SkCodec.h

Issue 1487583003: Allow SkAndroidCodec to use SkPngChunkReader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments on Patch Set 2 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 | « include/codec/SkAndroidCodec.h ('k') | src/codec/SkAndroidCodec.cpp » ('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 dffab6b3779207aeba99084810afb27d8416a097..9f28af010edf26d0ebc2cdaf600ac67423362afa 100644
--- a/include/codec/SkCodec.h
+++ b/include/codec/SkCodec.h
@@ -29,8 +29,17 @@ 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 the SkPngChunkReader is not NULL then:
+ * If the image is not a PNG, the SkPngChunkReader will be ignored.
+ * If the image is a PNG, the SkPngChunkReader will be reffed.
+ * If the PNG has unknown chunks, the SkPngChunkReader will be used
+ * to handle these chunks. SkPngChunkReader will be called to read
+ * any unknown chunk at any point during the creation of the codec
+ * or the decode. Note that if SkPngChunkReader fails to read a
+ * chunk, this could result in a failure to create the codec or a
+ * failure to decode the image.
+ * If the PNG does not contain unknown chunks, the SkPngChunkReader
+ * will not be used or modified.
*
* If NULL is returned, the stream is deleted immediately. Otherwise, the
* SkCodec takes ownership of it, and will delete it when done with it.
@@ -41,8 +50,17 @@ public:
* 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.
+ * If the SkPngChunkReader is not NULL then:
+ * If the image is not a PNG, the SkPngChunkReader will be ignored.
+ * If the image is a PNG, the SkPngChunkReader will be reffed.
+ * If the PNG has unknown chunks, the SkPngChunkReader will be used
+ * to handle these chunks. SkPngChunkReader will be called to read
+ * any unknown chunk at any point during the creation of the codec
+ * or the decode. Note that if SkPngChunkReader fails to read a
+ * chunk, this could result in a failure to create the codec or a
+ * 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.
*/
« no previous file with comments | « include/codec/SkAndroidCodec.h ('k') | src/codec/SkAndroidCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698