History log of /external/skia/fuzz/fuzz.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2416f968a69ff71f83eb17e97d1cb6448c916a69 12-Feb-2018 Kevin Lubick <kjlubick@google.com> Add 2 fuzz targets for image decoding (oss-fuzz)

This also adds in a few small guards to prevent libfuzzer from frequently
running out of memory when an image claims to have billions of pixels.

Bug: skia:
Change-Id: I47a9daac832c4d85a42000698482b61721c38880
Reviewed-on: https://skia-review.googlesource.com/106264
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
/external/skia/fuzz/fuzz.cpp
f034d118597dc346bfe7f327ea10a950a7c1e35d 08-Feb-2018 Kevin Lubick <kjlubick@google.com> Break some fuzzer targets out so oss-fuzz can use them

FuzzImageFilterDeserialize is already being used in oss-fuzz
but the target lived there and not here. This moves it here.

Then we can turn on:
- FuzzPathDeserialize
- FuzzTextBlobDeserialize


Bug: skia:
Change-Id: I7baee8386fb7aeebc43a68abfff9a670ba16f82c
Reviewed-on: https://skia-review.googlesource.com/105763
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
/external/skia/fuzz/fuzz.cpp
0331d37af9656e2e7c5dd1d79cb12396d51a19e9 23-Jan-2018 Mike Reed <reed@google.com> remove unneeded SkFlattenableSerialization

Bug: skia:
Change-Id: I5cf40b88b05dcd8e83383f6271b046eac8d55e35
Reviewed-on: https://skia-review.googlesource.com/98642
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/fuzz/fuzz.cpp
2541edf0c6f9dc6897853efe546b5c215034ad49 11-Jan-2018 Kevin Lubick <kjlubick@google.com> Add in Region SetPath Fuzzer

Also refactor a few things to make it easier to use oss-fuzz.

Bug: skia:
Change-Id: Ie518a6cfc7d57a347b5d09089379f986d33f8b7f
Reviewed-on: https://skia-review.googlesource.com/41740
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
/external/skia/fuzz/fuzz.cpp
edef8ec4b24f9d2ce76e4c53304e25853888bee4 09-Jan-2018 Kevin Lubick <kjlubick@google.com> Refactor SerializedImageFilter to avoid duplicate code

After this CL, we have 3.5 options for fuzzing ImageFilter
1. Create it from API calls and then draw it
fuzz -t api -n ImageFilter -b [input]

2. Deserialize a fuzzed stream into an ImageFilter (this is
what Chromium's filter_fuzz_stub does)
fuzz -t filter_fuzz -b [input]

3. Create an ImageFilter from API calls, serialize it, apply
some mutations to the stream, deserialize it, then draw it.
fuzz -t api -n SerializedImageFilter -b [input]

3.5 Create ImageFilters as part of our more general canvas
fuzzers.
fuzz -t api -n RasterN32Canvas -b [input] (and others)

Previously, the SerializedImageFilter had its own, slightly
stale and prone to stack-overflow way of making an image filter.
This CL re-uses what we already do for Canvas fuzzing and removes
that dead code.

Additionally, there is a way to easily generate a corpus
for the filter_fuzz type, via SerializedImageFilter.

Bug: skia:
Change-Id: I31bb4ffce2abf1c1a6d0a7000e5aceb8d7b38b65
Reviewed-on: https://skia-review.googlesource.com/92142
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
/external/skia/fuzz/fuzz.cpp
9ff5dc9c9f222059a9e191b528fbb86999ecebf5 09-Jan-2018 Kevin Lubick <kjlubick@google.com> Make commandline flags nicer for fuzz executable

This cleans up the build so commandline flags defined in tools/*.cpp
don't get globbed into the fuzzer's.

Bug: skia:
Change-Id: I5994aa5bf75686641baf0cf97fd81141f0ac6f3a
Reviewed-on: https://skia-review.googlesource.com/92680
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
/external/skia/fuzz/fuzz.cpp
0d825666f79f4d9baea489b21506da3163f73aa9 03-Jan-2018 Kevin Lubick <kjlubick@google.com> Add SkPipe fuzzer

Bug: skia:
Change-Id: I6e87758f2e5bff18e885834baaaa4a5add564cb1
Reviewed-on: https://skia-review.googlesource.com/90543
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/fuzz/fuzz.cpp
09757b29feeb1e7a4bc73dcf07c960e06f20cd66 12-Dec-2017 Kevin Lubick <kjlubick@google.com> Fuzz skpicture with ReadBuffer

Bug: skia:
Change-Id: Id581895b5248a8f24eed77cad20fc751257c2c95
Reviewed-on: https://skia-review.googlesource.com/83861
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
/external/skia/fuzz/fuzz.cpp
fadbfcd4aba676d44dfb08de1a83143a1c63b95c 06-Dec-2017 Mike Reed <reed@google.com> upgrade SkReadBuffer to always validate

Bug: skia:
Change-Id: I054560b66c6cde346d939015326d8547879d2c4b
Reviewed-on: https://skia-review.googlesource.com/81160
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/fuzz/fuzz.cpp
d46e85ff6903ca4d0d5d97bdfdde364b8559c0f4 21-Nov-2017 Kevin Lubick <kjlubick@google.com> Add textblob fuzzer

Bug: skia:
Change-Id: Id1962964507947ad090f083f4475cbe5c455fdf5
Reviewed-on: https://skia-review.googlesource.com/74760
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
/external/skia/fuzz/fuzz.cpp
c9d2829c5a82ebc34e2dac85088caadfa1df3126 09-Nov-2017 Kevin Lubick <kjlubick@google.com> Use validating buffer for skpath

Bug: skia:
Change-Id: I92191e60c874ff123b7d839f5c65f32e180f69eb
Reviewed-on: https://skia-review.googlesource.com/69080
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
/external/skia/fuzz/fuzz.cpp
a93a14a99816d25b773f0b12868143702baf44bf 28-Aug-2017 Ben Wagner <bungeman@google.com> Convert NULL and 0 to nullptr.

This was created by looking at warnings produced by clang's
-Wzero-as-null-pointer-constant. This updates most issues in
Skia code. However, there are places where GL and Vulkan want
pointer values which are explicitly 0, external headers which
use NULL directly, and possibly more uses in un-compiled
sources (for other platforms).

Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345
Reviewed-on: https://skia-review.googlesource.com/39521
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
/external/skia/fuzz/fuzz.cpp
93ba0a4fc85f04bc1be9429983df1e57473b49a7 14-Aug-2017 Brian Osman <brianosman@google.com> Switch SkSL to std::string

On desktop, this saves just over 5% of the time in the SkSL compiler.

As written, the code will now build either way, so it's much easier to
switch back (or even have some platforms use SkString, if that's ever
required).

Bug: skia:
Change-Id: I634f26a4f6fcb404e59bda6a5c6a21a9c6d73c0b
Reviewed-on: https://skia-review.googlesource.com/34381
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/fuzz/fuzz.cpp
ede7bac43fbc69b9fdf1c178890ba6353f5bb140 23-Jul-2017 Mike Reed <reed@google.com> use unique_ptr for codec factories

Will need guards for android (at least)

Bug: skia:
Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947
Reviewed-on: https://skia-review.googlesource.com/26040
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/fuzz/fuzz.cpp
086a427b0cee3862f25c492fc5082ff24105dc53 18-Jul-2017 Mike Reed <reed@google.com> guard references to SkColorTable

Bug: skia:6828
Change-Id: I0c8c78e70b118f51cb59dc45675e4ddcd4776108
Reviewed-on: https://skia-review.googlesource.com/24260
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
/external/skia/fuzz/fuzz.cpp
571b30f6117eede6d64cd2b924dc1f6aaa59e70e 11-Jul-2017 Leon Scroggins <scroggo@google.com> Reland "Remove support for decoding to kIndex_8"

Original change's description:
> > Remove support for decoding to kIndex_8
> >
> > Fix up callsites, and remove tests that no longer make sense.
> >
> > Bug: skia:6828
> > Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295
> > Reviewed-on: https://skia-review.googlesource.com/21664
> > Reviewed-by: Derek Sollenberger <djsollen@google.com>
> > Commit-Queue: Leon Scroggins <scroggo@google.com>
>
> TBR=djsollen@google.com,scroggo@google.com
>
> Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:6828
> Reviewed-on: https://skia-review.googlesource.com/22120
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

TBR=djsollen@google.com,scroggo@google.com

Bug: skia:6828
Change-Id: I36ff5a11c529d29e8adc95f43b8edc6fd1dbf5b8
Reviewed-on: https://skia-review.googlesource.com/22320
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/fuzz/fuzz.cpp
8321f7585b6aded0c35e50e9af8709b25fdce3f6 10-Jul-2017 Leon Scroggins <scroggo@google.com> Revert "Remove support for decoding to kIndex_8"

This reverts commit 742a3e298fda669006147e4a305bab8452369b1f.

Reason for revert: Breaking Android roll:
frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:453:18: error: no member named 'fColorPtr' in 'SkAndroidCodec::AndroidOptions'
codecOptions.fColorPtr = colorPtr;
~~~~~~~~~~~~ ^
frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:454:18: error: no member named 'fColorCount' in 'SkAndroidCodec::AndroidOptions'
codecOptions.fColorCount = colorCount;
~~~~~~~~~~~~ ^

Original change's description:
> Remove support for decoding to kIndex_8
>
> Fix up callsites, and remove tests that no longer make sense.
>
> Bug: skia:6828
> Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295
> Reviewed-on: https://skia-review.googlesource.com/21664
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

TBR=djsollen@google.com,scroggo@google.com

Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6828
Reviewed-on: https://skia-review.googlesource.com/22120
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/fuzz/fuzz.cpp
742a3e298fda669006147e4a305bab8452369b1f 10-Jul-2017 Leon Scroggins III <scroggo@google.com> Remove support for decoding to kIndex_8

Fix up callsites, and remove tests that no longer make sense.

Bug: skia:6828
Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295
Reviewed-on: https://skia-review.googlesource.com/21664
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/fuzz/fuzz.cpp
674a1848ae62277ea9a2d022b60aa1f17d306f17 06-Jul-2017 Leon Scroggins III <scroggo@google.com> Add SkCodec::Result indicating error in the data

Previously, SkGifCodec treated an error in the LZW data as incomplete,
since we can still draw the partially decoded image. But a client doing
incremental decodes needs to distinguish this from truly incomplete
data. In the case of an error, the client should not attempt to provide
more data and decode again.

Add kErrorInInput, and return it when SkGifCodec sees a fatal error.
Treat it the same as kIncompleteInput when it comes to filling and DM.

Bug: skia:6825
Change-Id: Ic6ce3a62c0b065ed34dcd8006309e43272a3db9f
Reviewed-on: https://skia-review.googlesource.com/21530
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
/external/skia/fuzz/fuzz.cpp
6b3155c4be0476bc53541b0431c368a44e69f0a7 03-Apr-2017 Mike Reed <reed@google.com> Revert[4] "clean up (partially) colortable api""""

Fixes:
- create temp api for android to pass nullptr
- don't release and access sk_sp<SkData> at the same time in parameters

This reverts commit b14131c1851eea6acbd34cc42a8f860daed36b21.

Bug: skia:
Change-Id: Ic0e4f62520ba9f35455499ed30d306ad19d998a8
Reviewed-on: https://skia-review.googlesource.com/11129
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
/external/skia/fuzz/fuzz.cpp
b14131c1851eea6acbd34cc42a8f860daed36b21 01-Apr-2017 Mike Reed <reed@google.com> Revert "Revert[2] "clean up (partially) colortable api"""

This reverts commit 9920b10f5292838f00600f676c4578cd11705e60.

Reason for revert: trying to get details on w2k failure

https://chromium-swarm.appspot.com/task?id=354345d34ba3b310&refresh=10

Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION, was running:
unit test HugeBlurImageFilter
unit test FontNames
unit test Codec_PngRoundTrip
unit test ClampRange
unit test FontHost
unit test ColorMatrixFilter
f16 image scaled_codec_premul abnormal.wbmp
565 image brd_android_codec_divisor_0.167 interlaced3.png_0.167
unit test Codec_png
unit test ImageFilterBlurLargeImage
unit test FontObj
unit test DrawText
unit test GrShape
565 image brd_android_codec_divisor_0.333 interlaced2.png_0.333
unit test PathOpsOpCubicsThreaded
unit test PathOpsOpLoopsThreaded
unit test FontMgr
unit test ColorToHSVRoundTrip
unit test Image_Serialize_Encoding_Failure
Likely culprit:
unit test Image_Serialize_Encoding_Failure
step returned non-zero exit code: -1073741819


Original change's description:
> Revert[2] "clean up (partially) colortable api""
>
> This reverts commit 1d1165ca6575e082b892c5460492c411618783ad.
>
> Bug: skia:
> Change-Id: Idbc0634ae3cec2e79f592d252de8751b077e6408
> Reviewed-on: https://skia-review.googlesource.com/11024
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ia4e73434b083224baa36092c69526c2f59bb16aa
Reviewed-on: https://skia-review.googlesource.com/11025
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/fuzz/fuzz.cpp
9920b10f5292838f00600f676c4578cd11705e60 01-Apr-2017 Mike Reed <reed@google.com> Revert[2] "clean up (partially) colortable api""

This reverts commit 1d1165ca6575e082b892c5460492c411618783ad.

Bug: skia:
Change-Id: Idbc0634ae3cec2e79f592d252de8751b077e6408
Reviewed-on: https://skia-review.googlesource.com/11024
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/fuzz/fuzz.cpp
0df1b04db87c3d86ee0b0bd6aa2cb5b6be32cac2 31-Mar-2017 Ethan Nicholas <ethannicholas@google.com> skslc can now be compiled with no Skia dependencies, in preparation for its eventual

This reverts commit 9bd301d640ff63c280b202c7dd00bc00a3315ff4.

Bug: skia:
Change-Id: I5ad3f77ef33aa5ce2fd27fe383c9339c571663a1
Reviewed-on: https://skia-review.googlesource.com/10964
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/fuzz/fuzz.cpp
1d1165ca6575e082b892c5460492c411618783ad 31-Mar-2017 Mike Klein <mtklein@chromium.org> Revert "clean up (partially) colortable api"

This reverts commit 2e491a6a113c5e16a3b7bede5fa6f588deeb928d.

Reason for revert: Windows unit tests failing?

Original change's description:
> clean up (partially) colortable api
>
> Needs this to land: https://codereview.chromium.org/2789853002/
>
> Bug: skia:
> Change-Id: I38d916a546b7fa64d000d973e695ddda24a589e7
> Reviewed-on: https://skia-review.googlesource.com/10600
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Matt Sarett <msarett@google.com>
>

TBR=msarett@google.com,scroggo@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I626e7edfcea82576a440dcaa851a04cedee6233f
Reviewed-on: https://skia-review.googlesource.com/10966
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/fuzz/fuzz.cpp
9bd301d640ff63c280b202c7dd00bc00a3315ff4 31-Mar-2017 Ethan Nicholas <ethannicholas@google.com> Revert "skslc can now be compiled with no Skia dependencies, in preparation for its eventual"

This reverts commit f3333c89bf05fc602d9bf8e1e24547668c660383.

Reason for revert: breaking the bots

Original change's description:
> skslc can now be compiled with no Skia dependencies, in preparation for its eventual
> role in Skia's build process.
>
> This reverts commit bcf35f86d50b784b165de703b404998dd4299f6a.
>
> BUG=skia:
>
> Change-Id: Id0a12dfc4d804d69a3c6bf60fed37e89ee130f02
> Reviewed-on: https://skia-review.googlesource.com/10802
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
>

TBR=benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: Ic7b50d391d25b3870acffa9764cbafc7f5c3be89
Reviewed-on: https://skia-review.googlesource.com/10962
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/fuzz/fuzz.cpp
2e491a6a113c5e16a3b7bede5fa6f588deeb928d 31-Mar-2017 Mike Reed <reed@google.com> clean up (partially) colortable api

Needs this to land: https://codereview.chromium.org/2789853002/

Bug: skia:
Change-Id: I38d916a546b7fa64d000d973e695ddda24a589e7
Reviewed-on: https://skia-review.googlesource.com/10600
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
/external/skia/fuzz/fuzz.cpp
f3333c89bf05fc602d9bf8e1e24547668c660383 31-Mar-2017 Ethan Nicholas <ethannicholas@google.com> skslc can now be compiled with no Skia dependencies, in preparation for its eventual
role in Skia's build process.

This reverts commit bcf35f86d50b784b165de703b404998dd4299f6a.

BUG=skia:

Change-Id: Id0a12dfc4d804d69a3c6bf60fed37e89ee130f02
Reviewed-on: https://skia-review.googlesource.com/10802
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
/external/skia/fuzz/fuzz.cpp
bcf35f86d50b784b165de703b404998dd4299f6a 30-Mar-2017 Ethan Nicholas <ethannicholas@google.com> Revert "skslc can now be compiled with no Skia dependencies, in preparation for"

This reverts commit 7833466da45bfa1e078427c4a6db94d41c5c1535.

Reason for revert: Vulkan assertion failure

Original change's description:
> skslc can now be compiled with no Skia dependencies, in preparation for
> its eventual role in Skia's build process.
>
> Bug: skia:
> Change-Id: Iaa9933f4fc4a64bec60aa897c509a3513f457a78
> Reviewed-on: https://skia-review.googlesource.com/10282
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
>

TBR=egdaniel@google.com,benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic64cac2395abb406116885ddd725f74a434c8c49
Reviewed-on: https://skia-review.googlesource.com/10758
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/fuzz/fuzz.cpp
7833466da45bfa1e078427c4a6db94d41c5c1535 30-Mar-2017 Ethan Nicholas <ethannicholas@google.com> skslc can now be compiled with no Skia dependencies, in preparation for
its eventual role in Skia's build process.

Bug: skia:
Change-Id: Iaa9933f4fc4a64bec60aa897c509a3513f457a78
Reviewed-on: https://skia-review.googlesource.com/10282
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
/external/skia/fuzz/fuzz.cpp
a839fc0b63bd68682dcf51abc77078bfea48c1a1 16-Mar-2017 Herb Derby <herb@google.com> Add Chromium's fuzz_fileter_fuzz to skia.

Move the fuzzer in
chromium/src/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc
to Skia's fuzzer.

I recommend removing filter_fuzz_stub from chromium and only
using Skia's fuzzer.

BUG=chromium:700836

Change-Id: Ibab1a9b696e54a3042ee61f5524d196c12df2888
Reviewed-on: https://skia-review.googlesource.com/9802
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
/external/skia/fuzz/fuzz.cpp
1ac8fd25381a043681a24dc3171189db535c587d 01-Mar-2017 Kevin Lubick <kjlubick@google.com> Define canvas fuzzers like the other API fuzzers

Invoke these like:
out/Clang/fuzz -n RasterN32Canvas -b [fuzz]
out/Clang/fuzz -n NullCanvas -b [fuzz]
out/Clang/fuzz -n PDFCanvas -b [fuzz]

For debugging:
out/Clang/fuzz -n _DumpCanvas -b [fuzz]

BUG=skia:

Change-Id: I19bd215df09ad2e4ceb7ab16ac6b232fb3f905ed
Reviewed-on: https://skia-review.googlesource.com/9097
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
/external/skia/fuzz/fuzz.cpp
62176db984b5623427401f8013ca1ae08e53c4f8 27-Feb-2017 Hal Canary <halcanary@google.com> fuzz: dump_canvas

For example: `fuzz --type _dump_canvas -b fuzz_file`

Note well: this command-line usage is subject to change.

Change-Id: Ida7368a699bafe2395604d8428a2d50cb0eff6aa
Reviewed-on: https://skia-review.googlesource.com/9025
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/fuzz/fuzz.cpp
24ac42b373d9202a89538a1873df9275870c7632 14-Feb-2017 Hal Canary <halcanary@google.com> Fuzz PDF, N32, and Null Canvases

run `fuzz --type pdf_canvas` or `fuzz --type null_canvas` or
`fuzz --type n32_canvas`

Change-Id: Id70179d5578ed1e67006aef7823bf75fc1d7a4a6
Reviewed-on: https://skia-review.googlesource.com/8418
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/fuzz/fuzz.cpp
0d4bc0d8299cb2e0a04f060638a5f7744821ff46 21-Feb-2017 Kevin Lubick <kjlubick@google.com> Draw path onto a canvas when fuzzing

BUG=skia:
NOTRY=true
TBR=jcgregorio@google.com

Change-Id: Icd6b1b884705f7599be23b5d6283adfcfcbe727b
Reviewed-on: https://skia-review.googlesource.com/8767
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
/external/skia/fuzz/fuzz.cpp
edee1ae9e3b87983ed0ff0ea55b3c49892901260 20-Feb-2017 Kevin Lubick <kjlubick@google.com> Write SkRegion fuzzer

BUG=688987

Change-Id: I2ad1c53ea01185a77b662d2d86b0c6d36fcb63c7
Reviewed-on: https://skia-review.googlesource.com/8499
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
/external/skia/fuzz/fuzz.cpp
0168e0442e00a42d8367422542033bc8a1ac9efe 14-Feb-2017 Kevin Lubick <kjlubick@google.com> Add a way to compute the code coverage of fuzzers

This also fixes bin/coverage.

fuzz/coverage borrows heavily from bin/coverage.
BUG=skia:

Change-Id: I9e353d1f5ea3bca1d57d66b1c1ecabc6f9b23cee
Reviewed-on: https://skia-review.googlesource.com/8414
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
/external/skia/fuzz/fuzz.cpp
ab273facbfe496a3d5dd798e6b4b57c41eed7f16 11-Jan-2017 Mike Reed <reed@google.com> move SkTRegister.h into tools

BUG=skia:

Change-Id: Ie7d4fac3024b361a281f456fec2b3a837e2bfe43
Reviewed-on: https://skia-review.googlesource.com/6881
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/fuzz/fuzz.cpp
f04c50ab9491b28aceb9d43acbf02b4f5d577ba7 06-Jan-2017 Kevin Lubick <kjlubick@google.com> Add in Path fuzzer

BUG=skia:

Change-Id: Ic8a56448b39bf6a8c6388bffb7f3b7c5ed798a2f
Reviewed-on: https://skia-review.googlesource.com/6692
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
/external/skia/fuzz/fuzz.cpp
f80f115dd5aebdfebe6c04f41f4c99a03a782e34 06-Jan-2017 Kevin Lubick <kjlubick@google.com> Be able to fuzz a directory of input

BUG=skia:5878

Change-Id: I13552948c86a83f2384b83f59432c11779f305f1
Reviewed-on: https://skia-review.googlesource.com/6528
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/fuzz/fuzz.cpp
941e7e2c9567ab1d8a3b2d1b0e3db71ee5eb75c9 12-Dec-2016 Ethan Nicholas <ethannicholas@google.com> re-land of added sk_FragCoord support to skslc

BUG=skia:

Change-Id: Ifac1aa39839058787ad1794200c3dbb93c147a69
Reviewed-on: https://skia-review.googlesource.com/5850
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/fuzz/fuzz.cpp
e8e4a3e6782586680086a0279eafb89969c29f3d 12-Dec-2016 Greg Daniel <egdaniel@google.com> Revert "added sk_FragCoord support to skslc"

This reverts commit ce33f10677630e34187b661a02161378d8304d68.

Reason for revert: Breaking many gpu bots

Change-Id: I94c813ed6a9311458c872f74bb1b0792f46ff414
Reviewed-on: https://skia-review.googlesource.com/5737
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
/external/skia/fuzz/fuzz.cpp
ce33f10677630e34187b661a02161378d8304d68 09-Dec-2016 Ethan Nicholas <ethannicholas@google.com> added sk_FragCoord support to skslc

BUG=skia:

Change-Id: If78a4d08121699f87659f0d2e35f3edbf1867401
Reviewed-on: https://skia-review.googlesource.com/5408
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/fuzz/fuzz.cpp
c5a8366d9922902cffbd351fdd15755dd2ac99bf 08-Dec-2016 Leon Scroggins III <scroggo@google.com> Add fuzzing for decoding animated images

Add a new mode to decode all frames of an animated image. Use
incremental decoding, rather than getPixels, since the primary client
uses incremental decoding.

Do not decode animated as index 8, which is only supported for the
first frame.

Change-Id: I5d7ed1a81c1ef37df3701c483486d4beff0f62a7
Reviewed-on: https://skia-review.googlesource.com/5679
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/fuzz/fuzz.cpp
f1dd677c3a4c7bb7e72dbfb77a0124c51b19aa7c 29-Nov-2016 Brian Salomon <bsalomon@google.com> Rename SkSL::GLSLCapsFactory to SkSL::ShaderCapsFactory

Change-Id: Ibc478f1a24d9d96e4d67a907c756389d184857de
Reviewed-on: https://skia-review.googlesource.com/5316
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/fuzz/fuzz.cpp
db6830162eca5b94e61d9825ec93306fc615d204 23-Nov-2016 Hal Canary <halcanary@google.com> SkImageEncoder: simplify API

(re-land 248ff02 & 2cb6cb7, with changes)

- Hide SkImageEncoder class in private header.
- SkImageEncoder::Type becomes SkEncodedImageFormat
- SkEncodedFormat becomes SkEncodedImageFormat
- SkImageEncoder static functions replaced with
single function EncodeImage()
- utility wrappers for EncodeImage() are in
sk_tool_utils.h

TODO: remove link-time registration mechanism.
TODO: clean up clients use of API and flip the flag.
TODO: implement EncodeImage() in chromeium/skia/ext

Change-Id: I47d451e50be4d5c6c130869c7fa7c2857243d9f0
Reviewed-on: https://skia-review.googlesource.com/4909
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-on: https://skia-review.googlesource.com/5186
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
/external/skia/fuzz/fuzz.cpp
a2b4bdce8cfd1a91407595a25683ecff982af22e 22-Nov-2016 Hal Canary <halcanary@google.com> Revert 248ff023 & 2cb6cb72

Revert "SkImageEncoder: simplify API"
This reverts commit 248ff02331d7f73ee4b6c5a7eabeae1080c16cd4.
Revert "Fix bug: can't convert nullptr -> bool"
This reverts commit 2cb6cb7218171b357bb5c934f032ba69c7b78401.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5151
NOTRY=true

Change-Id: I5f6414392d6545f74db0b5bb50608d04f053a8ec
Reviewed-on: https://skia-review.googlesource.com/5151
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
/external/skia/fuzz/fuzz.cpp
248ff02331d7f73ee4b6c5a7eabeae1080c16cd4 22-Nov-2016 Hal Canary <halcanary@google.com> SkImageEncoder: simplify API

- Hide SkImageEncoder class in private header.
- SkImageEncoder::Type becomes SkEncodedImageFormat
- SkEncodedFormat becomes SkEncodedImageFormat
- SkImageEncoder static functions replaced with
single function EncodeImage()
- utility wrappers for EncodeImage() are in
sk_tool_utils.h

TODO: remove link-time registration mechanism.
TODO: clean up clients use of API and flip the flag.
TODO: implement EncodeImage() in chromeium/skia/ext

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4909

Change-Id: Ib48b31fdc05cf23cda7f56ebfd67c841c149ce70
Reviewed-on: https://skia-review.googlesource.com/4909
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/fuzz/fuzz.cpp
9e1138d56665d13641f8805cd72ae81adc255f79 21-Nov-2016 Ethan Nicholas <ethannicholas@google.com> re-land of switched skslc from std::string to SkString

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5084

Change-Id: Ib21c30afc0d8483392b417e660b7fecfcc30e617
Reviewed-on: https://skia-review.googlesource.com/5084
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/fuzz/fuzz.cpp
792d0f13d6cb58ddf27b45e6835ba54c1d8ade77 20-Nov-2016 Greg Daniel <egdaniel@google.com> Revert "switched skslc from std::string to SkString"

This reverts commit d8df21a1e08b5b3380261f4b90acfbdc538ef93c.

Reason for revert: Breaking Roll

Original change's description:
> switched skslc from std::string to SkString
>
> BUG=skia:
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4977
>
> Change-Id: I15e24963b09b719a2c07da67745114f5ac66cee8
> Reviewed-on: https://skia-review.googlesource.com/4977
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
>

TBR=bsalomon@google.com,benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I84d5311beb9d5e607b7a4a3c138332f0c8f19648
Reviewed-on: https://skia-review.googlesource.com/5077
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
/external/skia/fuzz/fuzz.cpp
d8df21a1e08b5b3380261f4b90acfbdc538ef93c 17-Nov-2016 Ethan Nicholas <ethannicholas@google.com> switched skslc from std::string to SkString

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4977

Change-Id: I15e24963b09b719a2c07da67745114f5ac66cee8
Reviewed-on: https://skia-review.googlesource.com/4977
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/fuzz/fuzz.cpp
7ef4b74e57a143e4e586e577e9b7c11c3aab472d 11-Nov-2016 Ethan Nicholas <ethannicholas@google.com> re-re-land of skslc now uses standard Skia caps

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4732

Change-Id: I144110bf66f67a28da7ad333173db43bddf9e8d0
Reviewed-on: https://skia-review.googlesource.com/4732
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/fuzz/fuzz.cpp
857cb97a34ea1870b20ecbae6aa937a57243359c 11-Nov-2016 Leon Scroggins <scroggo@google.com> Revert "re-land of skslc now uses standard Skia caps"

This reverts commit 498d403f7703cb2157bf3c877b84906db5a06cd4.

Reason for revert: Breaking compile bot:
https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Ubuntu-GCC-x86_64-Release-NoGPU/builds/10116/steps/compile_skia%20on%20Ubuntu/logs/stdio

undefined reference to `GrGLSLCaps::GrGLSLCaps(GrContextOptions const&)

Original change's description:
> re-land of skslc now uses standard Skia caps
>
> BUG=skia:
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4726
>
> Change-Id: Ib1ea5d4269396e6c57ee1f0d7209aa9a9f2798e8
> Reviewed-on: https://skia-review.googlesource.com/4726
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
>

TBR=bsalomon@google.com,benjaminwagner@google.com,kjlubick@google.com,ethannicholas@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I7ee96d6c658be6b7b79027c147b8950c78c79a70
Reviewed-on: https://skia-review.googlesource.com/4729
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
/external/skia/fuzz/fuzz.cpp
498d403f7703cb2157bf3c877b84906db5a06cd4 11-Nov-2016 Ethan Nicholas <ethannicholas@google.com> re-land of skslc now uses standard Skia caps

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4726

Change-Id: Ib1ea5d4269396e6c57ee1f0d7209aa9a9f2798e8
Reviewed-on: https://skia-review.googlesource.com/4726
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/fuzz/fuzz.cpp
b0b5360ae4078560b2f5f8508471129e4dd1cee6 11-Nov-2016 Leon Scroggins <scroggo@google.com> Revert "skslc now uses standard Skia caps"

This reverts commit 8af38a96475ac5ce83b20c16d9cf82bf1006b8c4.

Reason for revert: Breaking compile bots, e.g. from https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Ubuntu-GCC-x86_64-Debug-NoGPU/builds/10029/steps/compile_skia%20on%20Ubuntu/logs/stdio :

In function `sk_make_sp<GrGLSLCaps, GrContextOptions>'
undefined reference to `GrGLSLCaps::GrGLSLCaps(GrContextOptions const&)

In function `_Z10sk_make_spI10GrGLSLCapsI16GrContextOptionsEE5sk_spIT_EDpOT0_':
undefined reference to `GrGLSLCaps::GrGLSLCaps(GrContextOptions const&)




Original change's description:
> skslc now uses standard Skia caps
>
> BUG=skia:
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4660
>
> Change-Id: Idaedae3f81426b97f5052bb872cdf0610e47a84f
> Reviewed-on: https://skia-review.googlesource.com/4660
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
>

TBR=bsalomon@google.com,benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic7f987f5c050ac2e333f5a0f16c8de85c1047a74
Reviewed-on: https://skia-review.googlesource.com/4697
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
/external/skia/fuzz/fuzz.cpp
8af38a96475ac5ce83b20c16d9cf82bf1006b8c4 10-Nov-2016 Ethan Nicholas <ethannicholas@google.com> skslc now uses standard Skia caps

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4660

Change-Id: Idaedae3f81426b97f5052bb872cdf0610e47a84f
Reviewed-on: https://skia-review.googlesource.com/4660
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
/external/skia/fuzz/fuzz.cpp
2db83612576d64935bd88747cf9855e79cad70d4 04-Nov-2016 Hal Canary <halcanary@google.com> bench, samples, etc: s/SkAutoTUnref/sk_sp/

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4437

Change-Id: Ice071684ac8a99e4bb405b4b9be8e8f42c7bac42
Reviewed-on: https://skia-review.googlesource.com/4437
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/fuzz/fuzz.cpp
145dbcd165d9d27298eb8888bc240e2d06a95464 03-Nov-2016 Ben Wagner <bungeman@google.com> Remove SkAutoTDelete.

Replace with std::unique_ptr.

Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176
Reviewed-on: https://skia-review.googlesource.com/4381
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/fuzz/fuzz.cpp
2f535cecd0e5a19a3dfb76649b1d90c7e158e24c 01-Nov-2016 Kevin Lubick <kjlubick@google.com> Make fuzzers use cleaner interface

signalBoring() no longer exists. When the fuzzer runs out of randomness,
it just returns 0. Fuzzers should not go into infinite loops if this
happens. do while loops are particularly error-prone.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3963

Change-Id: Iebcfc14cc6b0a19c5dd015cd39875c81fa44003e
Reviewed-on: https://skia-review.googlesource.com/3963
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/fuzz/fuzz.cpp
19b91531e912283d237435d94516575b28713cba 24-Oct-2016 scroggo <scroggo@chromium.org> Add support for multiple frames in SkCodec

Add an interface to decode frames beyond the first in SkCodec, and
add an implementation for SkGifCodec.

Add getFrameData to SkCodec. This method reads ahead in the stream
to return a vector containing meta data about each frame in the image.
This is not required in order to decode frames beyond the first, but
it allows a client to learn extra information:
- how long the frame should be displayed
- whether a frame should be blended with a prior frame, allowing the
client to provide the prior frame to speed up decoding

Add a new fields to SkCodec::Options:
- fFrameIndex
- fHasPriorFrame

The API is designed so that SkCodec never caches frames. If a
client wants a frame beyond the first, they specify the frame in
Options.fFrameIndex. If the client does not have the
frame's required frame (the frame that this frame must be blended on
top of) cached, they pass false for
Options.fHasPriorFrame. Unless the frame is
independent, the codec will then recursively decode all frames
necessary to decode fFrameIndex. If the client has the required frame
cached, they can put it in the dst they pass to the codec, and the
codec will only draw fFrameIndex onto it.

Replace SkGifCodec's scanline decoding support with progressive
decoding, and update the tests accordingly.

Implement new APIs in SkGifCodec. Instead of using gif_lib, use
GIFImageReader, imported from Chromium (along with its copyright
headers) with the following changes:
- SkGifCodec is now the client
- Replace blink types
- Combine GIFColorMap::buildTable and ::getTable into a method that
creates and returns an SkColorTable
- Input comes from an SkStream, instead of a SegmentReader. Add
SkStreamBuffer, which buffers the (potentially partial) stream in
order to decode progressively.
(FIXME: This requires copying data that previously was read directly
from the SegmentReader. Does this hurt performance? If so, can we
fix it?)
- Remove UMA code
- Instead of reporting screen width and height to the client, allow the
client to query for it
- Fail earlier if the first frame AND screen have size of zero
- Compute required previous frame when adding a new one
- Move GIFParseQuery from GIFImageDecoder to GIFImageReader
- Allow parsing up to a specific frame (to skip parsing the rest of the
stream if a client only wants the first frame)
- Compute whether the first frame has alpha and supports index 8, to
create the SkImageInfo. This happens before reporting that the size
has been decoded.

Add GIFImageDecoder::haveDecodedRow to SkGifCodec, imported from
Chromium (along with its copyright header), with the following changes:
- Add support for sampling
- Use the swizzler
- Keep track of the rows decoded
- Do *not* keep track of whether we've seen alpha

Remove SkCodec::kOutOfOrder_SkScanlineOrder, which was only used by GIF
scanline decoding.

Call onRewind even if there is no stream (SkGifCodec needs to clear its
decoded state so it will decode from the beginning).

Add a method to SkSwizzler to access the offset into the dst, taking
subsetting into account.

Add a GM that animates a GIF.
Add tests for the new APIs.

*** Behavior changes:
* Previously, we reported that an image with a subset frame and no transparent
index was opaque and used the background index (if present) to fill the
background. This is necessary in order to support index 8, but it does not
match viewers/browsers I have seen. Examples:
- Chromium and Gimp render the background transparent
- Firefox, Safari, Linux Image Viewer, Safari Preview clip to the frame (for
a single frame image)
This CL matches Chromium's behavior and renders the background transparent.
This allows us to have consistent behavior across products and simplifies
the code (relative to what we would have to do to continue the old behavior
on Android). It also means that we will no longer support index 8 for some
GIFs.
* Stop checking for GIFSTAMP - all GIFs should be either 89a or 87a.
This matches Chromium. I suspect that bugs would have been reported if valid
GIFs started with "GIFVER" instead of "GIF89a" or "GIF87a" (but did not decode
in Chromium).

*** Future work not included in this CL:
* Move some checks out of haveDecodedRow, since they are the same for the
entire frame e.g.
- intersecting the frameRect with the full image size
- whether there is a color table
* Change when we write transparent pixels
- In some cases, Chromium deemed this unnecessary, but I suspect it is slower
than the fallback case. There will continue to be cases where we should
*not* write them, but for e.g. the first pass where we have already
cleared to transparent (which we may also be able to skip) writing the
transparent pixels will not make anything incorrect.
* Report color type and alpha type per frame
- Depending on alpha values, disposal methods, frame rects, etc, subsequent
frames may have different properties than the first.
* Skip copies of the encoded data
- We copy the encoded data in case the stream is one that cannot be rewound,
so we can parse and then decode (possibly not immediately). For some input
streams, this is unnecessary.
- I was concerned this cause a performance regression, but on average the
new code is faster than the old for the images I tested [1].
- It may cause a performance regression for Chromium, though, where we can
always move back in the stream, so this should be addressed.

Design doc:
https://docs.google.com/a/google.com/document/d/12Qhf9T92MWfdWujQwCIjhCO3sw6pTJB5pJBwDM1T7Kc/

[1] https://docs.google.com/a/google.com/spreadsheets/d/19V-t9BfbFw5eiwBTKA1qOBkZbchjlTC5EIz6HFy-6RI/

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=2045293002

Review-Url: https://codereview.chromium.org/2045293002
/external/skia/fuzz/fuzz.cpp
526972ecb5411b84ba2f5e20252f178f9ee2151f 24-Oct-2016 Brian Osman <brianosman@google.com> Rename all color space factories from New* to Make*

Matches our naming convention for all other types - factories that
return sk_sp (or any type that intelligently manages its own
lifetime) are named Make.

Previous factories are still around, assuming
SK_SUPPORT_LEGACY_COLOR_SPACE_FACTORIES is defined. Enable that
define for Android, etc.

See also: https://codereview.chromium.org/2442053002/

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3822

Change-Id: Iaea9376490736b494e8ffc820831f052bbe1478d
Reviewed-on: https://skia-review.googlesource.com/3822
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/fuzz/fuzz.cpp
ddb37d67ba4db42fa5c6012b58d0f4985b454dc0 20-Oct-2016 ethannicholas <ethannicholas@google.com> re-re-land of skslc now automatically turns on derivatives support

Only change from last attempt is putting the call to shaderDerivativeExtensionString behind a check for shaderDerivativeSupport to avoid a spurious assertion failure.

TBR=benjaminwagner@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2437063002

Review-Url: https://chromiumcodereview.appspot.com/2437063002
/external/skia/fuzz/fuzz.cpp
e719577fe8ac3de38795cde2007337f854d97435 18-Oct-2016 kjlubick <kjlubick@google.com> Add SKSL fuzzer

BUG=skia:5490
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2418763004

Review-Url: https://codereview.chromium.org/2418763004
/external/skia/fuzz/fuzz.cpp
8e6c7ada5a4c5a950cded765d14d3e6906acdc79 16-Sep-2016 scroggo <scroggo@chromium.org> Make SkPngCodec decode progressively.

This is a step towards using SkCodec in Chromium, where progressive
decoding is necessary.

Switch from using png_read_row (which expects all the data to be
available) to png_process_data, which uses callbacks when rows are
available.

Create a new API for SkCodec, which supports progressive decoding and
scanline decoding. Future changes will switch the other clients off of
startScanlineDecode and get/skip-Scanlines to the new API.

Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
updateCurrScanline(), which was only used by the old implementation for
interlaced PNG.

DMSrcSink:
- In CodecSrc::kScanline_Mode, use the new method for scanline decoding
for the supported formats (just PNG and PNG-in-ICO for now).

fuzz.cpp:
- Remove reference to kNone_ScanlineOrder

SkCodec:
- Add new APIs:
- startIncrementalDecode
- incrementalDecode
- Remove kNone_SkScanlineOrder and updateCurrScanline()
- Set fDstInfo and fOptions in getPixels(). This may not be necessary
for all implementations, but it simplifies things for SkPngCodec.

SkPngCodec:
- Implement new APIs
- Switch from sk_read_fn/png_read_row etc to png_process_data
- Expand AutoCleanPng's role to decode the header and create the
SkPngCodec
- Make the interlaced PNG decoder report how many lines were
initialized during an incomplete decode

SkIcoCodec:
- Implement the new APIs; supported for PNG in ICO

SkSampledCodec:
- Call the new method for decoding scanlines, and fall back to the old
method if the new version is unimplemented
- Remove references to kNone_SkScanlineOrder

tests/CodecPartial:
- Add a test which decodes part of an image, then finishes the decode,
and compares it to the straightforward method

tests/CodecTest:
- Add a test which decodes all scanlines using the new method
- Repurpose the Codec_stripes test to decode using the new method in
sections rather than all at once
- In the method check(), add a parameter for whether the image supports
the new method of scanline decoding, and be explicit about whether an
image supports incomplete
- Test incomplete PNG decodes. We should have been doing it anyway for
non-interlaced (except for an image that is too small - one row), but
the new method supports interlaced incomplete as well
- Make test_invalid_parameters test the new method
- Add a test to ensure that it's safe to fall back to scanline decoding without
rewinding

BUG=skia:4211

The new version was generally faster than the old version (but not significantly so).

Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/

Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1997703003

Review-Url: https://codereview.chromium.org/1997703003
/external/skia/fuzz/fuzz.cpp
42943c8aa9c611c18ad0f1a30a27669f3d82239c 12-Sep-2016 reed <reed@google.com> change SkStreams to work with sk_sp<SkData> instead of SkData*

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333713002

Review-Url: https://codereview.chromium.org/2333713002
/external/skia/fuzz/fuzz.cpp
38d909ec2875f79952de08f36adfaac5680d2c53 02-Aug-2016 bungeman <bungeman@google.com> Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.

This moves Skia code off of SK_SUPPORT_LEGACY_DATA_FACTORIES.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206633004

Review-Url: https://codereview.chromium.org/2206633004
/external/skia/fuzz/fuzz.cpp
e565450d0ba81a9869be79664126fd8517dc1632 20-Jul-2016 kjlubick <kjlubick@google.com> Port FuzzPathop from chromium

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2148023002

Review-Url: https://codereview.chromium.org/2148023002
/external/skia/fuzz/fuzz.cpp
3e3c1a5857a43a2851aa5bb05d6639935793bac0 23-Jun-2016 kjlubick <kjlubick@google.com> Add deserialize color space entry point for fuzzing

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2089783003

Review-Url: https://codereview.chromium.org/2089783003
/external/skia/fuzz/fuzz.cpp
897a8e38879643d81a64d2bb6bed4e22af982aa4 09-Jun-2016 kjlubick <kjlubick@google.com> Add ICC fuzzer

BUG=skia:5404
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2047353003

Review-Url: https://codereview.chromium.org/2047353003
/external/skia/fuzz/fuzz.cpp
d8d6855345b486d2ec03047497da2036ccea3eb7 06-Jun-2016 scroggo <scroggo@google.com> Revert of Make SkPngCodec decode progressively. (patchset #26 id:520001 of https://codereview.chromium.org/1997703003/ )

Reason for revert:
Still causing problems in Google3, e.g.

https://test.corp.google.com/ui#cl=124138817&flags=CAMQBQ==&id=OCL:124138817:BASE:124139560:1465227435491:219ffbdb&t=//third_party/skia/HEAD:dm

Original issue's description:
> Make SkPngCodec decode progressively.
>
> This is a step towards using SkCodec in Chromium, where progressive
> decoding is necessary.
>
> Switch from using png_read_row (which expects all the data to be
> available) to png_process_data, which uses callbacks when rows are
> available.
>
> Create a new API for SkCodec, which supports progressive decoding and
> scanline decoding. Future changes will switch the other clients off of
> startScanlineDecode and get/skip-Scanlines to the new API.
>
> Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
> PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
> updateCurrScanline(), which was only used by the old implementation for
> interlaced PNG.
>
> DMSrcSink:
> - In CodecSrc::kScanline_Mode, use the new method for scanline decoding
> for the supported formats (just PNG and PNG-in-ICO for now).
>
> fuzz.cpp:
> - Remove reference to kNone_ScanlineOrder
>
> SkCodec:
> - Add new APIs:
> - startIncrementalDecode
> - incrementalDecode
> - Remove kNone_SkScanlineOrder and updateCurrScanline()
>
> SkPngCodec:
> - Implement new APIs
> - Switch from sk_read_fn/png_read_row etc to png_process_data
> - Expand AutoCleanPng's role to decode the header and create the
> SkPngCodec
> - Make the interlaced PNG decoder report how many lines were
> initialized during an incomplete decode
> - Make initializeSwizzler return a bool instead of an SkCodec::Result
> (It only returned kSuccess or kInvalidInput anyway)
>
> SkIcoCodec:
> - Implement the new APIs; supported for PNG in ICO
>
> SkSampledCodec:
> - Call the new method for decoding scanlines, and fall back to the old
> method if the new version is unimplemented
> - Remove references to kNone_SkScanlineOrder
>
> tests/CodecPartial:
> - Add a test which decodes part of an image, then finishes the decode,
> and compares it to the straightforward method
>
> tests/CodecTest:
> - Add a test which decodes all scanlines using the new method
> - Repurpose the Codec_stripes test to decode using the new method in
> sections rather than all at once
> - In the method check(), add a parameter for whether the image supports
> the new method of scanline decoding, and be explicit about whether an
> image supports incomplete
> - Test incomplete PNG decodes. We should have been doing it anyway for
> non-interlaced (except for an image that is too small - one row), but
> the new method supports interlaced incomplete as well
> - Make test_invalid_parameters test the new method
> - Add a test to ensure that it's safe to fall back to scanline decoding without
> rewinding
>
> BUG=skia:4211
>
> The new version was generally faster than the old version (but not significantly so).
>
> Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/
>
> Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1997703003
>
> Committed: https://skia.googlesource.com/skia/+/a4b09a117d4d1ba5dda372e6a2323e653766539e
>
> Committed: https://skia.googlesource.com/skia/+/30e78c9737ff4861dc4e3fa1e4cd010680ed6965
>
> Committed: https://skia.googlesource.com/skia/+/6fb2391b2cc83ee2160b4e994faa8128975acc1f

TBR=reed@google.com,msarett@google.com,scroggo@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:4211
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2044573002

Review-Url: https://codereview.chromium.org/2044573002
/external/skia/fuzz/fuzz.cpp
6fb2391b2cc83ee2160b4e994faa8128975acc1f 02-Jun-2016 scroggo <scroggo@chromium.org> Make SkPngCodec decode progressively.

This is a step towards using SkCodec in Chromium, where progressive
decoding is necessary.

Switch from using png_read_row (which expects all the data to be
available) to png_process_data, which uses callbacks when rows are
available.

Create a new API for SkCodec, which supports progressive decoding and
scanline decoding. Future changes will switch the other clients off of
startScanlineDecode and get/skip-Scanlines to the new API.

Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
updateCurrScanline(), which was only used by the old implementation for
interlaced PNG.

DMSrcSink:
- In CodecSrc::kScanline_Mode, use the new method for scanline decoding
for the supported formats (just PNG and PNG-in-ICO for now).

fuzz.cpp:
- Remove reference to kNone_ScanlineOrder

SkCodec:
- Add new APIs:
- startIncrementalDecode
- incrementalDecode
- Remove kNone_SkScanlineOrder and updateCurrScanline()

SkPngCodec:
- Implement new APIs
- Switch from sk_read_fn/png_read_row etc to png_process_data
- Expand AutoCleanPng's role to decode the header and create the
SkPngCodec
- Make the interlaced PNG decoder report how many lines were
initialized during an incomplete decode
- Make initializeSwizzler return a bool instead of an SkCodec::Result
(It only returned kSuccess or kInvalidInput anyway)

SkIcoCodec:
- Implement the new APIs; supported for PNG in ICO

SkSampledCodec:
- Call the new method for decoding scanlines, and fall back to the old
method if the new version is unimplemented
- Remove references to kNone_SkScanlineOrder

tests/CodecPartial:
- Add a test which decodes part of an image, then finishes the decode,
and compares it to the straightforward method

tests/CodecTest:
- Add a test which decodes all scanlines using the new method
- Repurpose the Codec_stripes test to decode using the new method in
sections rather than all at once
- In the method check(), add a parameter for whether the image supports
the new method of scanline decoding, and be explicit about whether an
image supports incomplete
- Test incomplete PNG decodes. We should have been doing it anyway for
non-interlaced (except for an image that is too small - one row), but
the new method supports interlaced incomplete as well
- Make test_invalid_parameters test the new method
- Add a test to ensure that it's safe to fall back to scanline decoding without
rewinding

BUG=skia:4211

The new version was generally faster than the old version (but not significantly so).

Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/

Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1997703003

Committed: https://skia.googlesource.com/skia/+/a4b09a117d4d1ba5dda372e6a2323e653766539e

Committed: https://skia.googlesource.com/skia/+/30e78c9737ff4861dc4e3fa1e4cd010680ed6965

Review-Url: https://codereview.chromium.org/1997703003
/external/skia/fuzz/fuzz.cpp
26694c32d2a7a511bb2832204bb7759219b9d7bc 01-Jun-2016 scroggo <scroggo@google.com> Revert of Make SkPngCodec decode progressively. (patchset #24 id:480001 of https://codereview.chromium.org/1997703003/ )

Reason for revert:
Still breaking Google3 e.g.:

https://sponge.corp.google.com/target?id=9261d31b-34fc-4f0f-981e-f92f7c5cea2c&target=//third_party/skia/HEAD:dm#shard=1|run=1|attempt=1|page=-1

https://test.corp.google.com/ui#cl=123773095&flags=CAMQBQ==&id=OCL:123773095:BASE:123773415:1464804876959:b0ea9b1c&t=//third_party/skia/HEAD:dm

Original issue's description:
> Make SkPngCodec decode progressively.
>
> This is a step towards using SkCodec in Chromium, where progressive
> decoding is necessary.
>
> Switch from using png_read_row (which expects all the data to be
> available) to png_process_data, which uses callbacks when rows are
> available.
>
> Create a new API for SkCodec, which supports progressive decoding and
> scanline decoding. Future changes will switch the other clients off of
> startScanlineDecode and get/skip-Scanlines to the new API.
>
> Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
> PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
> updateCurrScanline(), which was only used by the old implementation for
> interlaced PNG.
>
> DMSrcSink:
> - In CodecSrc::kScanline_Mode, use the new method for scanline decoding
> for the supported formats (just PNG and PNG-in-ICO for now).
>
> fuzz.cpp:
> - Remove reference to kNone_ScanlineOrder
>
> SkCodec:
> - Add new APIs:
> - startIncrementalDecode
> - incrementalDecode
> - Remove kNone_SkScanlineOrder and updateCurrScanline()
>
> SkPngCodec:
> - Implement new APIs
> - Switch from sk_read_fn/png_read_row etc to png_process_data
> - Expand AutoCleanPng's role to decode the header and create the
> SkPngCodec
> - Make the interlaced PNG decoder report how many lines were
> initialized during an incomplete decode
> - Make initializeSwizzler return a bool instead of an SkCodec::Result
> (It only returned kSuccess or kInvalidInput anyway)
>
> SkIcoCodec:
> - Implement the new APIs; supported for PNG in ICO
>
> SkSampledCodec:
> - Call the new method for decoding scanlines, and fall back to the old
> method if the new version is unimplemented
> - Remove references to kNone_SkScanlineOrder
>
> tests/CodecPartial:
> - Add a test which decodes part of an image, then finishes the decode,
> and compares it to the straightforward method
>
> tests/CodecTest:
> - Add a test which decodes all scanlines using the new method
> - Repurpose the Codec_stripes test to decode using the new method in
> sections rather than all at once
> - In the method check(), add a parameter for whether the image supports
> the new method of scanline decoding, and be explicit about whether an
> image supports incomplete
> - Test incomplete PNG decodes. We should have been doing it anyway for
> non-interlaced (except for an image that is too small - one row), but
> the new method supports interlaced incomplete as well
> - Make test_invalid_parameters test the new method
> - Add a test to ensure that it's safe to fall back to scanline decoding without
> rewinding
>
> BUG=skia:4211
>
> The new version was generally faster than the old version (but not significantly so).
>
> Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/
>
> Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1997703003
>
> Committed: https://skia.googlesource.com/skia/+/a4b09a117d4d1ba5dda372e6a2323e653766539e
>
> Committed: https://skia.googlesource.com/skia/+/30e78c9737ff4861dc4e3fa1e4cd010680ed6965

TBR=reed@google.com,msarett@google.com,scroggo@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4211

Review-Url: https://codereview.chromium.org/2026383002
/external/skia/fuzz/fuzz.cpp
30e78c9737ff4861dc4e3fa1e4cd010680ed6965 01-Jun-2016 scroggo <scroggo@chromium.org> Make SkPngCodec decode progressively.

This is a step towards using SkCodec in Chromium, where progressive
decoding is necessary.

Switch from using png_read_row (which expects all the data to be
available) to png_process_data, which uses callbacks when rows are
available.

Create a new API for SkCodec, which supports progressive decoding and
scanline decoding. Future changes will switch the other clients off of
startScanlineDecode and get/skip-Scanlines to the new API.

Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
updateCurrScanline(), which was only used by the old implementation for
interlaced PNG.

DMSrcSink:
- In CodecSrc::kScanline_Mode, use the new method for scanline decoding
for the supported formats (just PNG and PNG-in-ICO for now).

fuzz.cpp:
- Remove reference to kNone_ScanlineOrder

SkCodec:
- Add new APIs:
- startIncrementalDecode
- incrementalDecode
- Remove kNone_SkScanlineOrder and updateCurrScanline()

SkPngCodec:
- Implement new APIs
- Switch from sk_read_fn/png_read_row etc to png_process_data
- Expand AutoCleanPng's role to decode the header and create the
SkPngCodec
- Make the interlaced PNG decoder report how many lines were
initialized during an incomplete decode
- Make initializeSwizzler return a bool instead of an SkCodec::Result
(It only returned kSuccess or kInvalidInput anyway)

SkIcoCodec:
- Implement the new APIs; supported for PNG in ICO

SkSampledCodec:
- Call the new method for decoding scanlines, and fall back to the old
method if the new version is unimplemented
- Remove references to kNone_SkScanlineOrder

tests/CodecPartial:
- Add a test which decodes part of an image, then finishes the decode,
and compares it to the straightforward method

tests/CodecTest:
- Add a test which decodes all scanlines using the new method
- Repurpose the Codec_stripes test to decode using the new method in
sections rather than all at once
- In the method check(), add a parameter for whether the image supports
the new method of scanline decoding, and be explicit about whether an
image supports incomplete
- Test incomplete PNG decodes. We should have been doing it anyway for
non-interlaced (except for an image that is too small - one row), but
the new method supports interlaced incomplete as well
- Make test_invalid_parameters test the new method
- Add a test to ensure that it's safe to fall back to scanline decoding without
rewinding

BUG=skia:4211

The new version was generally faster than the old version (but not significantly so).

Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/

Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1997703003

Committed: https://skia.googlesource.com/skia/+/a4b09a117d4d1ba5dda372e6a2323e653766539e

Review-Url: https://codereview.chromium.org/1997703003
/external/skia/fuzz/fuzz.cpp
9a89a0966bba433a109f2b1275aaaeb630321bae 31-May-2016 scroggo <scroggo@google.com> Revert of Make SkPngCodec decode progressively. (patchset #18 id:340001 of https://codereview.chromium.org/1997703003/ )

Reason for revert:
This is failing tests and then crashing on Google3 [1]. The crashes are fixed by crrev.com/2026873002, but to fix the builder we'll need to upgrade its version of libpng.

[1] https://sponge.corp.google.com/target?id=e545ef55-4da4-4931-9524-1ac92acb61b1&target=//third_party/skia/HEAD:dm#shard=1|run=1|attempt=1|page=-1

Original issue's description:
> Make SkPngCodec decode progressively.
>
> This is a step towards using SkCodec in Chromium, where progressive
> decoding is necessary.
>
> Switch from using png_read_row (which expects all the data to be
> available) to png_process_data, which uses callbacks when rows are
> available.
>
> Create a new API for SkCodec, which supports progressive decoding and
> scanline decoding. Future changes will switch the other clients off of
> startScanlineDecode and get/skip-Scanlines to the new API.
>
> Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
> PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
> updateCurrScanline(), which was only used by the old implementation for
> interlaced PNG.
>
> DMSrcSink:
> - In CodecSrc::kScanline_Mode, use the new method for scanline decoding
> for the supported formats (just PNG and PNG-in-ICO for now).
>
> fuzz.cpp:
> - Remove reference to kNone_ScanlineOrder
>
> SkCodec:
> - Add new APIs:
> - startIncrementalDecode
> - incrementalDecode
> - Remove kNone_SkScanlineOrder and updateCurrScanline()
>
> SkPngCodec:
> - Implement new APIs
> - Switch from sk_read_fn/png_read_row etc to png_process_data
> - Expand AutoCleanPng's role to decode the header and create the
> SkPngCodec
> - Make the interlaced PNG decoder report how many lines were
> initialized during an incomplete decode
> - Make initializeSwizzler return a bool instead of an SkCodec::Result
> (It only returned kSuccess or kInvalidInput anyway)
>
> SkIcoCodec:
> - Implement the new APIs; supported for PNG in ICO
>
> SkSampledCodec:
> - Call the new method for decoding scanlines, and fall back to the old
> method if the new version is unimplemented
> - Remove references to kNone_SkScanlineOrder
>
> tests/CodecPartial:
> - Add a test which decodes part of an image, then finishes the decode,
> and compares it to the straightforward method
>
> tests/CodecTest:
> - Add a test which decodes all scanlines using the new method
> - Repurpose the Codec_stripes test to decode using the new method in
> sections rather than all at once
> - In the method check(), add a parameter for whether the image supports
> the new method of scanline decoding, and be explicit about whether an
> image supports incomplete
> - Test incomplete PNG decodes. We should have been doing it anyway for
> non-interlaced (except for an image that is too small - one row), but
> the new method supports interlaced incomplete as well
> - Make test_invalid_parameters test the new method
> - Add a test to ensure that it's safe to fall back to scanline decoding without
> rewinding
>
> BUG=skia:4211
>
> The new version was generally faster than the old version (but not significantly so).
>
> Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/
>
> Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1997703003
>
> Committed: https://skia.googlesource.com/skia/+/a4b09a117d4d1ba5dda372e6a2323e653766539e

TBR=reed@google.com,msarett@google.com,scroggo@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4211

Review-Url: https://codereview.chromium.org/2023103002
/external/skia/fuzz/fuzz.cpp
a4b09a117d4d1ba5dda372e6a2323e653766539e 31-May-2016 scroggo <scroggo@chromium.org> Make SkPngCodec decode progressively.

This is a step towards using SkCodec in Chromium, where progressive
decoding is necessary.

Switch from using png_read_row (which expects all the data to be
available) to png_process_data, which uses callbacks when rows are
available.

Create a new API for SkCodec, which supports progressive decoding and
scanline decoding. Future changes will switch the other clients off of
startScanlineDecode and get/skip-Scanlines to the new API.

Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
updateCurrScanline(), which was only used by the old implementation for
interlaced PNG.

DMSrcSink:
- In CodecSrc::kScanline_Mode, use the new method for scanline decoding
for the supported formats (just PNG and PNG-in-ICO for now).

fuzz.cpp:
- Remove reference to kNone_ScanlineOrder

SkCodec:
- Add new APIs:
- startIncrementalDecode
- incrementalDecode
- Remove kNone_SkScanlineOrder and updateCurrScanline()

SkPngCodec:
- Implement new APIs
- Switch from sk_read_fn/png_read_row etc to png_process_data
- Expand AutoCleanPng's role to decode the header and create the
SkPngCodec
- Make the interlaced PNG decoder report how many lines were
initialized during an incomplete decode
- Make initializeSwizzler return a bool instead of an SkCodec::Result
(It only returned kSuccess or kInvalidInput anyway)

SkIcoCodec:
- Implement the new APIs; supported for PNG in ICO

SkSampledCodec:
- Call the new method for decoding scanlines, and fall back to the old
method if the new version is unimplemented
- Remove references to kNone_SkScanlineOrder

tests/CodecPartial:
- Add a test which decodes part of an image, then finishes the decode,
and compares it to the straightforward method

tests/CodecTest:
- Add a test which decodes all scanlines using the new method
- Repurpose the Codec_stripes test to decode using the new method in
sections rather than all at once
- In the method check(), add a parameter for whether the image supports
the new method of scanline decoding, and be explicit about whether an
image supports incomplete
- Test incomplete PNG decodes. We should have been doing it anyway for
non-interlaced (except for an image that is too small - one row), but
the new method supports interlaced incomplete as well
- Make test_invalid_parameters test the new method
- Add a test to ensure that it's safe to fall back to scanline decoding without
rewinding

BUG=skia:4211

The new version was generally faster than the old version (but not significantly so).

Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/

Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1997703003

Review-Url: https://codereview.chromium.org/1997703003
/external/skia/fuzz/fuzz.cpp
9fd07e5cc4d693b39397d00ae0a80f0cab420f7b 12-Apr-2016 kjlubick <kjlubick@google.com> Make fuzz builds set SK_FUZZ_LOGGING

BUG=skia:5191
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1878363002

Review URL: https://codereview.chromium.org/1878363002
/external/skia/fuzz/fuzz.cpp
4319593988db5796023d9f5f34a8ed285c2097dd 05-Apr-2016 kjlubick <kjlubick@google.com> Do an in-place replacement of SkRandom with Fuzz for FilterFuzz

This feels rather clunky, because we aren't using the full potential of the
fuzzer, but it works, it seems.

BUG=skia:4969
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1710183002

Review URL: https://codereview.chromium.org/1710183002
/external/skia/fuzz/fuzz.cpp
ca2622ba051829fed5f30facd74c5b41cd4b931c 18-Mar-2016 reed <reed@google.com> return pictures as sk_sp

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1811703002

Review URL: https://codereview.chromium.org/1811703002
/external/skia/fuzz/fuzz.cpp
5bd98a244bb1ab1b3cad945e2fa1ce3dfd62d8cf 18-Feb-2016 kjlubick <kjlubick@google.com> Create ParsePath API fuzz

This is based on https://codereview.chromium.org/1675053002

BUG=skia:4438
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1702383003

Review URL: https://codereview.chromium.org/1702383003
/external/skia/fuzz/fuzz.cpp
2a42f48b58f11c32017e2da6c8468a3e2cd9bd8c 17-Feb-2016 kjlubick <kjlubick@google.com> Add ability to fuzz images using scaling and different modes

This also fixes the tryAllocPixels/SkColorTable mismatch which was causing the
"Image might be too large (32 x 32)" problems.

BUG=skia:4952
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1698963003

Review URL: https://codereview.chromium.org/1698963003
/external/skia/fuzz/fuzz.cpp
47d158eb3c50578cf0b2e74d72f8a7d7a73a1aab 01-Feb-2016 kjlubick <kjlubick@google.com> Make fuzz broadcast when it terminates via return.

This helps analysis figure out things like timeouts and unexpected, uncaught
exits.

TBR=mtkelin@google.com
BUG=skia:4438
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1657743002

Review URL: https://codereview.chromium.org/1657743002
/external/skia/fuzz/fuzz.cpp
2b6aa21817ce600d280fe29cc088cc86ebd5d514 27-Jan-2016 kjlubick <kjlubick@google.com> Make fuzz output the words success for a 'clean exit'

The analysis looks for "Success" to determine if the fuzz should be considered
a clean exit or not. It classifies clean exists as "grey" fuzzes, i.e. fixed.

TBR=mtklein@google.com
BUG=skia:4438
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1646603002

Review URL: https://codereview.chromium.org/1646603002
/external/skia/fuzz/fuzz.cpp
d4387ea99369ee1b89bbc9ffc0d8c203a8923515 21-Jan-2016 mtklein <mtklein@chromium.org> fuzz: list API fuzzing options if -t api and -n matches nothing.

Today we segfault if --name is empty. This fixes that too.

This updates some terms: -t api lets us fuzz an API.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1617713003

Review URL: https://codereview.chromium.org/1617713003
/external/skia/fuzz/fuzz.cpp
dba57344090631bba798e64e78f776bf6afba89c 21-Jan-2016 kjlubick <kjlubick@google.com> Seperating our fuzzing binary from DM produces a 50x speed increase for decoding images and a 10x speed increase in decoding/rendering Skps.

This also lets us differentiate between the decoding of Skps and the rendering of them, the latter of which may be more interesting for bugs.

BUG=skia:4800
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1591073002

Review URL: https://codereview.chromium.org/1591073002
/external/skia/fuzz/fuzz.cpp
d0b823479af35c559271999a0ebb2ad3327daaae 15-Jan-2016 mtklein <mtklein@chromium.org> If we pass no bytes, use the fuzz binary itself.

This is mostly for convenient local testing.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1587043009

Review URL: https://codereview.chromium.org/1587043009
/external/skia/fuzz/fuzz.cpp
f5e9782bdea16bbe2983198ed5cd3df8e8af37c1 15-Jan-2016 mtklein <mtklein@chromium.org> Restore creature comforts to fuzz binary

The hack to remove these niceties didn't seem to make a difference in my
fuzz/s, so we might as well keep them.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1589493006

Review URL: https://codereview.chromium.org/1589493006
/external/skia/fuzz/fuzz.cpp
a115942ed69762206f87c680ef7ec98de3382fa6 15-Jan-2016 mtklein <mtklein@chromium.org> fuzz: signalBug() / signalBoring()

Instead of a single ASSERT macro, this switches to two new methods:
- signalBug(): tell afl-fuzz there's a bug caused by its inputs (by crashing)
- signalBoring(): tell afl-fuzz these inputs are not worth testing (by exiting gracefully)

I'm not seeing any effect on fuzz/s when I just always log verbosely.

signalBug() now triggers SIGSEGV rather than SIGABRT. This should make it work with catchsegv more easily.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1585353002

Review URL: https://codereview.chromium.org/1585353002
/external/skia/fuzz/fuzz.cpp
24a22c7de8890642e43d6ae1115ecd59e2f8f0db 14-Jan-2016 mtklein <mtklein@chromium.org> some fuzz hacking

Try to start faster:
- remove flags dependency
- print nothing
- strip unused symbols from the binary on Mac (smaller binary)
- only create one fuzz object
- only run one DEF_FUZZ
I am not sure if any of these things mattered, but I thought you may like to look.

Good stuff:
- make nextU() / nextF() work
- drop nextURange() / nextFRange() for now
- add nextB() for a single byte

As you may have guessed, I have figured out how to use afl-fuzz on my laptop.

Syntax to run becomes:
$ afl-fuzz ... out/Release/fuzz <DEF_FUZZ name> @@

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1581203003

Review URL: https://codereview.chromium.org/1581203003
/external/skia/fuzz/fuzz.cpp
65e5824d3a46c468530aba5de4c11b6c8de4cede 13-Jan-2016 mtklein <mtklein@chromium.org> Add new fuzz binary.

This is designed to have short startup time, for maximum fuzzing throughput.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1589563002

Review URL: https://codereview.chromium.org/1589563002
/external/skia/fuzz/fuzz.cpp