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

Unified Diff: src/images/SkImageDecoder_libpng.cpp

Issue 1040453002: Add SkPngChunkReader. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Peeker -> SkChunkReader, passed to constructor. Created 5 years, 9 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
« include/core/SkChunkReader.h ('K') | « src/images/SkImageDecoder.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libpng.cpp
diff --git a/src/images/SkImageDecoder_libpng.cpp b/src/images/SkImageDecoder_libpng.cpp
index 4101b3e4ec30ce07d57955c2f772d0b4698cdebb..b6cab3c310bb06e9b0ecad516dd81ad81abd900f 100644
--- a/src/images/SkImageDecoder_libpng.cpp
+++ b/src/images/SkImageDecoder_libpng.cpp
@@ -143,10 +143,9 @@ static void sk_seek_fn(png_structp png_ptr, png_uint_32 offset) {
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
static int sk_read_user_chunk(png_structp png_ptr, png_unknown_chunkp chunk) {
- SkImageDecoder::Peeker* peeker =
- (SkImageDecoder::Peeker*)png_get_user_chunk_ptr(png_ptr);
- // peek() returning true means continue decoding
- return peeker->peek((const char*)chunk->name, chunk->data, chunk->size) ?
+ SkChunkReader* peeker = (SkChunkReader*)png_get_user_chunk_ptr(png_ptr);
+ // readChunk() returning true means continue decoding
+ return peeker->readChunk((const char*)chunk->name, chunk->data, chunk->size) ?
1 : -1;
}
#endif
« include/core/SkChunkReader.h ('K') | « src/images/SkImageDecoder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698