skia2/include/codec
Leon Scroggins III cb6b8848de Fix uninitialized bug in SkWuffsCodec for incomplete images
Bug: skia:8579

Zero-initialize the pixel buffer that wuffs uses inside the frame rect.
If the encoded image is incomplete, we will swizzle this memory into the
destination, so this prevents swizzling uninitialized memory.

In addition, zero-initialize the client's memory if the above buffer
will not fill it, and if the frame is independent.

Move decodeFrameConfig into onStartIncrementalDecode. This makes it
clear that we haven't begun decoding the pixels so rowsDecoded is
irrelevant. Update the documentation for onStartIncrementalDecode to
make it clear that it can be called more than once (and when to do so).

If a frame is incomplete and depends on prior frames, do not blend it.
This will overwrite pixels from the prior frames without a way to undo.
Current clients only want to show incomplete images for the first frame
anyway.

Add some debugging information to Codec_partialAnim test, including
writing out pngs when failing the test.

TBR=djsollen@google.com for documentation change in SkCodec.h

Change-Id: I85c8ca4075301306f4738ddfc2f5992a5745108b
Reviewed-on: https://skia-review.googlesource.com/c/174310
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Nigel Tao <nigeltao@google.com>
2018-12-05 18:27:28 +00:00
..
SkAndroidCodec.h Make SkAndroidCodec (optionally) respect origin 2018-01-26 22:13:34 +00:00
SkCodec.h Fix uninitialized bug in SkWuffsCodec for incomplete images 2018-12-05 18:27:28 +00:00
SkCodecAnimation.h Make SkCodec more flexible about its required frame 2017-06-07 20:15:17 +00:00
SkEncodedOrigin.h Add SkEncodedOrigin to SkYUVASizeInfo, fix JPEG orientation in GPU decode path 2018-11-30 16:05:36 +00:00