skia2/tools
halcanary@google.com fed3037217 Make image decoding more fault resistant, less verbose.
This change address what happens when a jpeg is partially downloaded
before failing.  Many browsers will render it anyway: we want Skia to
do the same.  The JpegTest takes a perfectly cromulent jpeg file and
only passes into the ImageDecoder the first half of the image.  We
then verify that the image decoder returns a valid bitmap of the
correct dimensions.

We also fixed some png library errors, including issue 1691.

Also, suppressed the majority of warnings from using libpng and
libjpeg.  By default, most warnings are *not* suppressed in debug mode.
If you have a debug binary and wish to suppress warnings, set the
following environment variables to true
    skia_images_png_suppressDecoderWarnings
    skia_images_jpeg_suppressDecoderWarnings
or from within a program that links to Skia:
    #if defined(SK_DEBUG)
    #include "SkRTConf.h"
    SK_CONF_SET("images.jpeg.suppressDecoderWarnings", true);
    SK_CONF_SET("images.png.suppressDecoderWarnings", true);
    #endif

I tested this, before (control) and after these changes (test), on
364,295 skps from the cluster telemetry.
-   number of errors+warnings in control = 2804
-   number of errors+warnings fixed = 2283
-   number of PNG verbosity fixed =  2152
-   number of PNG error fixed = 4
-   number of PNG segfault fixed = 3
-   number of PNG errors changed to warnings = 62
-   number of JPG verbosity fixed =  26
-   number of JPG error fixed = 91
Not all errors and warning have been fixed.

These numbers were generated using the find_bad_images_in_skps.py
program.  This program may be useful going forward for testing
image-decoding libraries on skp files from the cluster telemetry.
find_bad_images_in_skps.py depends on the test_image_decoder program,
which simply executes the SkImageDecoder::DecodeFile function and uses
its exit status to report success or failure.

BUG=skia:1649
BUG=skia:1691
BUG=skia:1680
R=scroggo@google.com

Review URL: https://codereview.chromium.org/24449003

git-svn-id: http://skia.googlecode.com/svn/trunk@11597 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-04 12:46:45 +00:00
..
copyright Script to automatically update copyright notices in C/C++ source code. 2011-07-28 14:29:58 +00:00
flags gm: add --ignoreTests flag 2013-09-19 06:18:27 +00:00
lua Added 3-color gradient scraper for detecting symmetrical gradients. 2013-08-01 17:32:56 +00:00
skpdiff fix path issues on mac and win for skpdiff_server.py 2013-08-14 19:20:35 +00:00
tests Add README file so git will create empty dir 2013-09-11 17:31:49 +00:00
__init__.py Add bench_pictures config 2012-12-12 20:13:26 +00:00
asan_build Enable ASAN build 2013-07-03 15:55:05 +00:00
bbh_shootout.cpp Major bench refactoring. 2013-09-10 19:23:38 +00:00
bench_pictures_cfg_helper.py Fix bench_pictures.cfg 2013-03-07 20:18:27 +00:00
bench_pictures_main.cpp Restore a default timer to bench_pictures. 2013-08-02 16:09:10 +00:00
bench_pictures.cfg Enable msaa4 on Nexus 4 in bench_pictures 2013-09-16 20:39:23 +00:00
build-tot-chromium.sh Add safesync_url to build-tot-chromium.sh 2013-07-11 11:28:41 +00:00
buildbot_globals.py Remove base-* directories from gm expected/actual paths; just use platform names 2013-08-20 16:21:55 +00:00
CopyTilesRenderer.cpp Flags for render_pictures: verify, clone and writeWholeImage: 2012-12-18 22:24:03 +00:00
CopyTilesRenderer.h Created my own flag parser, based off of gflags. 2013-03-04 16:41:06 +00:00
coverage.sh add a way to get code coverage 2013-09-13 19:32:43 +00:00
doxygen_footer.txt Fix update-doxygen, which fails when skia-autogen is reset 2012-09-26 16:09:43 +00:00
filtermain.cpp Replace SkPicture(SkStream) constructors with a factory. 2013-06-28 21:32:00 +00:00
find_bad_images_in_skps.py Make image decoding more fault resistant, less verbose. 2013-10-04 12:46:45 +00:00
find_mac_sdk.py Argv[0] isn't the first argument to anything. 2013-02-08 22:45:11 +00:00
gcov_shim add a way to get code coverage 2013-09-13 19:32:43 +00:00
generate_fir_coeff.py Fix metrics on Windows. 2013-07-27 20:37:56 +00:00
git-skia-verify Land http://codereview.appspot.com/6117046/ for Guanqun.Lu@gmail.com 2012-04-24 15:19:23 +00:00
jsondiff.py svndiff.py: properly handle empty expectations dictionary 2013-09-04 16:27:16 +00:00
LazyDecodeBitmap.cpp Add the lazy decoder from PictureFlags to SkImageDecoder 2013-07-16 18:21:46 +00:00
LazyDecodeBitmap.h Add the lazy decoder from PictureFlags to SkImageDecoder 2013-07-16 18:21:46 +00:00
merge_static_libs.py Build Skia as a static library 2012-10-10 19:45:51 +00:00
path_utils.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2012-12-08 02:01:38 +00:00
path_utils.h Sanitizing source files in Skia_Periodic_House_Keeping 2012-12-08 02:01:38 +00:00
PdfRenderer.cpp Encode images with DCTDecode (JPEG) in PDFs if it makes sense. Fallback to FlateDecode (zip) if it makes sense. Otherewise include uncompressed stream. 2013-04-24 13:01:01 +00:00
PdfRenderer.h Use SkPicture::ExtractBitmap callback in pdf too, there is no need for a specialized function pointer for pdf only only to pass a rectangle, when we can use subseted bitmaps. 2013-10-03 19:29:21 +00:00
picture_utils.cpp Defining new color constat for transparent color 2012-12-06 21:47:40 +00:00
picture_utils.h Remove automatic resizing in *_pictures 2012-09-20 18:54:04 +00:00
PictureBenchmark.cpp Committed: http://code.google.com/p/skia/source/detail?r=10372 2013-07-31 20:00:56 +00:00
PictureBenchmark.h Committed: http://code.google.com/p/skia/source/detail?r=10372 2013-07-31 20:00:56 +00:00
PictureRenderer.cpp R-Tree -- Don't sort draw commands unless specified. 2013-08-30 17:27:47 +00:00
PictureRenderer.h add extra flag (currently unused) for high quality downsampling 2013-07-09 14:13:04 +00:00
PictureRenderingFlags.cpp Sanitizing source files in Housekeeper-Nightly 2013-07-17 07:01:13 +00:00
PictureRenderingFlags.h Change the name of SkFlags to SkCommandLineFlags. 2013-03-21 19:43:15 +00:00
pinspect.cpp Add the lazy decoder from PictureFlags to SkImageDecoder 2013-07-16 18:21:46 +00:00
rebaseline.py Add an option to rebaseline.py to mark tests as ignore-failure. 2013-09-18 19:14:43 +00:00
reformat-json.py add reformat-json.py script 2013-07-19 15:45:22 +00:00
render_pdfs_main.cpp Use SkPicture::ExtractBitmap callback in pdf too, there is no need for a specialized function pointer for pdf only only to pass a rectangle, when we can use subseted bitmaps. 2013-10-03 19:29:21 +00:00
render_pictures_main.cpp Add support to dump font cache texture for debug purposes 2013-10-02 18:19:17 +00:00
roll_autogen.sh Script to help cycle skia-autogen 2012-08-27 19:37:48 +00:00
sanitize_source_files.py Ignore the .git directory in sanitize_source_files, remove .git directory... 2013-09-11 13:01:27 +00:00
skdiff_html.cpp fix warnings 2013-01-07 22:26:05 +00:00
skdiff_html.h Add newline at end of tools/skdiff_html.h to happify the housekeeping bot 2012-12-05 20:30:00 +00:00
skdiff_image.cpp Change comment to avoid warning (don't end line comment with '\'). 2013-02-04 16:24:44 +00:00
skdiff_main.cpp force linking inside of skdiff 2013-06-18 21:23:31 +00:00
skdiff_utils.cpp Update skdiff. 2012-12-05 20:13:12 +00:00
skdiff_utils.h Sanitizing source files in Skia_Periodic_House_Keeping 2012-12-06 02:01:25 +00:00
skdiff.cpp * Extended skdiff to report alpha channel differences. 2013-01-03 19:23:22 +00:00
skdiff.h * Extended skdiff to report alpha channel differences. 2013-01-03 19:23:22 +00:00
skhello.cpp promote SkImage::AlphaType to SkAlphaType 2013-09-20 19:33:52 +00:00
skimage_main.cpp Fixes for decoding to A8. 2013-10-03 17:13:38 +00:00
submit_try Update references to buildbot globals deprecated by r10856 2013-08-21 17:35:59 +00:00
submit_try.bat Modify submit_try to work on windows 2013-01-24 21:38:51 +00:00
svn.py Create HTTP-based GM results viewer. 2013-09-27 15:02:44 +00:00
svndiff.py Move gm-expected to trunk/expectations/gm , and modify scripts that use it. 2013-07-23 19:37:03 +00:00
test_image_decoder.cpp Make image decoding more fault resistant, less verbose. 2013-10-04 12:46:45 +00:00
test_pdfs.py Add an SKP to PDF rendered. test_pdfs.py will be hooked up in buildbot testing later. 2012-10-10 15:20:34 +00:00
test_pictures.py Refactor test_pictures so we can add test_pdfs without code duplication. 2012-10-10 15:08:12 +00:00
test_rendering.py Refactor test_pictures so we can add test_pdfs without code duplication. 2012-10-10 15:08:12 +00:00
update-doxygen.sh Housekeeper should not fail when skia-autogen is reset. 2013-05-01 14:47:03 +00:00
verify_images_for_gm_results.py Remove base-* directories from gm expected/actual paths; just use platform names 2013-08-20 16:21:55 +00:00
win_dbghelp.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-03-09 07:01:15 +00:00
win_dbghelp.h Collect minidump and print callstack if an app chrashes. 2013-03-08 18:00:16 +00:00
win_lcid.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-04-03 07:01:14 +00:00