skia2/src
Nigel Tao b7a1b5189d SkWuffsCodec: zero dst buffer before decodeFrame
https://skia-review.googlesource.com/c/189866 "SkWuffsCodec: Initialize
memory when incomplete" made some buffer zero'ing conditional on a
frame's dirty rectangle, which required moving the this->decodeFrame
call earlier in onIncrementalDecode, since we can't know the dirty
rectangle until after decodeFrame is called.

However, moving that earlier meant that it was now earlier than the
"sk_bzero(pixels.ptr + etc, etc)" call that zero-initialized the
destination buffer that decodeFrame writes to. The actual pixel indexes
that decodeFrame decodes are now overwritten by zeroes.

That prior commit fixed the fuzzer-discovered bug, in that it no longer
swizzles from uninitialized memory. Unfortunately, it's now often
swizzling from all-zeroed memory, so that the decoding is incorrect.

This commit moves the zero-ing to onStartIncrementalDecode, even
earlier. The "dm --match Gif" tests are happy again.

Bug: skia:8235
Change-Id: Iae993b7d9f45e1b375ed99f6cc86536091a92eba
Reviewed-on: https://skia-review.googlesource.com/c/190941
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2019-02-12 03:48:10 +00:00
..
android add saveBehind to canvas 2018-12-19 14:44:09 +00:00
atlastext Rename GrContext::contextPriv to priv 2019-02-04 22:13:14 +00:00
c expand imageinfo in C api, start on colorspace 2018-09-28 17:52:59 +00:00
codec SkWuffsCodec: zero dst buffer before decodeFrame 2019-02-12 03:48:10 +00:00
compute skc: Avoid undefined variable modification 2019-02-11 17:53:02 +00:00
core Common code calculates strike for mask case. 2019-02-11 21:45:14 +00:00
effects Reland "SkSL is now pickier about type conversions" 2019-02-06 02:40:59 +00:00
fonts move Sk{Test,Random}ScalerContext to tools 2017-11-10 17:02:20 +00:00
gpu Outline GrDrawAtlasOp and GrDrawVerticesOp 2019-02-11 20:38:35 +00:00
image SkImage_GpuYUVA: Also sanity check height 2019-02-11 09:35:22 +00:00
images Remove nearly all use of SkColorSpaceTransferFn 2019-01-24 17:45:19 +00:00
lazy begin cleanup of malloc porting layer 2018-01-05 21:29:35 +00:00
opts Add support for MSVC run-time checks (and control flow guard) 2019-02-04 20:55:24 +00:00
pathops SkPathOpsTSect: Avoid null dereference in asserts 2019-02-09 12:39:57 +00:00
pdf Fix cluster reporting from shaper. 2019-02-11 21:59:33 +00:00
ports turn on -Wextra-semi-stmt on Windows 2019-02-11 16:50:09 +00:00
sfnt Improve name table handling. 2018-08-20 20:39:54 +00:00
shaders Reland "SkSL is now pickier about type conversions" 2019-02-06 02:40:59 +00:00
sksl sksl: Use va_end() after va_copy() 2019-02-11 18:34:22 +00:00
svg Implement drawImage in terms of drawImageRect 2019-02-11 17:02:00 +00:00
utils Fix cluster reporting from shaper. 2019-02-11 21:59:33 +00:00
xml Fix occurrences of "-Wextra-semi-stmt" 2018-11-30 23:23:09 +00:00
xps Implement drawImage in terms of drawImageRect 2019-02-11 17:02:00 +00:00