2014-12-17 21:43:13 +00:00
|
|
|
# GYP file to build various tools.
|
2011-06-02 14:38:23 +00:00
|
|
|
#
|
|
|
|
# To build on Linux:
|
|
|
|
# ./gyp_skia tools.gyp && make tools
|
|
|
|
#
|
|
|
|
{
|
|
|
|
'includes': [
|
|
|
|
'apptype_console.gypi',
|
|
|
|
],
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
# Build all executable targets defined below.
|
|
|
|
'target_name': 'tools',
|
|
|
|
'type': 'none',
|
|
|
|
'dependencies': [
|
2013-01-18 18:06:22 +00:00
|
|
|
'bench_pictures',
|
2014-05-06 19:45:18 +00:00
|
|
|
'dump_record',
|
2013-01-18 18:06:22 +00:00
|
|
|
'filter',
|
2014-04-28 13:19:34 +00:00
|
|
|
'gpuveto',
|
2014-01-02 18:51:38 +00:00
|
|
|
'lua_app',
|
2014-01-02 19:42:15 +00:00
|
|
|
'lua_pictures',
|
2014-12-17 21:08:17 +00:00
|
|
|
'imgconv',
|
2013-01-18 18:06:22 +00:00
|
|
|
'pinspect',
|
|
|
|
'render_pdfs',
|
|
|
|
'render_pictures',
|
2011-06-02 14:38:23 +00:00
|
|
|
'skdiff',
|
2014-01-02 18:51:38 +00:00
|
|
|
'skhello',
|
2015-01-30 17:03:29 +00:00
|
|
|
'skp2svg',
|
2014-01-02 19:42:15 +00:00
|
|
|
'skpdiff',
|
2014-03-03 19:18:39 +00:00
|
|
|
'skpinfo',
|
2014-01-02 19:42:15 +00:00
|
|
|
'skpmaker',
|
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
|
|
|
'test_image_decoder',
|
2014-11-13 20:52:35 +00:00
|
|
|
'test_public_includes',
|
2011-06-02 14:38:23 +00:00
|
|
|
],
|
2013-06-20 17:15:05 +00:00
|
|
|
'conditions': [
|
|
|
|
['skia_shared_lib',
|
|
|
|
{
|
|
|
|
'dependencies': [
|
|
|
|
'sklua', # This can only be built if skia is built as a shared library
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
2011-06-02 14:38:23 +00:00
|
|
|
},
|
2014-06-20 18:29:20 +00:00
|
|
|
{
|
|
|
|
'target_name': 'crash_handler',
|
|
|
|
'type': 'static_library',
|
|
|
|
'sources': [ '../tools/CrashHandler.cpp' ],
|
|
|
|
'dependencies': [ 'skia_lib.gyp:skia_lib' ],
|
|
|
|
'direct_dependent_settings': {
|
|
|
|
'include_dirs': [ '../tools' ],
|
|
|
|
},
|
|
|
|
'all_dependent_settings': {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'AdditionalDependencies': [ 'Dbghelp.lib' ],
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'resources',
|
|
|
|
'type': 'static_library',
|
|
|
|
'sources': [ '../tools/Resources.cpp' ],
|
|
|
|
'dependencies': [
|
|
|
|
'flags.gyp:flags',
|
|
|
|
'skia_lib.gyp:skia_lib',
|
|
|
|
],
|
|
|
|
'direct_dependent_settings': {
|
2014-06-21 17:54:17 +00:00
|
|
|
'include_dirs': [ '../tools', ],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'sk_tool_utils',
|
|
|
|
'type': 'static_library',
|
2014-06-23 18:25:00 +00:00
|
|
|
'sources': [
|
|
|
|
'../tools/sk_tool_utils.cpp',
|
|
|
|
'../tools/sk_tool_utils_font.cpp',
|
|
|
|
],
|
2014-07-31 12:58:44 +00:00
|
|
|
'include_dirs': [
|
|
|
|
'../src/fonts',
|
|
|
|
],
|
2014-06-21 17:54:17 +00:00
|
|
|
'dependencies': [
|
2014-07-31 15:31:56 +00:00
|
|
|
'resources',
|
2014-07-31 12:58:44 +00:00
|
|
|
'flags.gyp:flags',
|
2014-06-21 17:54:17 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
|
|
|
],
|
|
|
|
'direct_dependent_settings': {
|
|
|
|
'include_dirs': [ '../tools', ],
|
2014-06-20 18:29:20 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name' : 'timer',
|
|
|
|
'type': 'static_library',
|
|
|
|
'sources': [
|
|
|
|
'../tools/timer/Timer.cpp',
|
|
|
|
'../tools/timer/TimerData.cpp',
|
|
|
|
],
|
|
|
|
'include_dirs': [
|
|
|
|
'../src/core',
|
|
|
|
'../src/gpu',
|
|
|
|
],
|
|
|
|
'direct_dependent_settings': {
|
|
|
|
'include_dirs': ['../tools/timer'],
|
|
|
|
},
|
|
|
|
'dependencies': [
|
|
|
|
'skia_lib.gyp:skia_lib',
|
|
|
|
'jsoncpp.gyp:jsoncpp',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
['skia_gpu == 1', {
|
|
|
|
'sources': [ '../tools/timer/GpuTimer.cpp' ],
|
|
|
|
}],
|
|
|
|
[ 'skia_os in ["mac", "ios"]', {
|
|
|
|
'sources': [ '../tools/timer/SysTimer_mach.cpp' ],
|
|
|
|
}],
|
|
|
|
[ 'skia_os == "win"', {
|
|
|
|
'sources': [ '../tools/timer/SysTimer_windows.cpp' ],
|
|
|
|
}],
|
|
|
|
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
|
|
|
|
'sources': [ '../tools/timer/SysTimer_posix.cpp' ],
|
|
|
|
}],
|
|
|
|
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
|
|
|
|
'link_settings': { 'libraries': [ '-lrt' ] },
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
},
|
2011-06-02 14:38:23 +00:00
|
|
|
{
|
|
|
|
'target_name': 'skdiff',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
2012-12-05 20:13:12 +00:00
|
|
|
'../tools/skdiff.cpp',
|
|
|
|
'../tools/skdiff.h',
|
|
|
|
'../tools/skdiff_html.cpp',
|
|
|
|
'../tools/skdiff_html.h',
|
2011-06-02 14:38:23 +00:00
|
|
|
'../tools/skdiff_main.cpp',
|
2012-12-05 20:13:12 +00:00
|
|
|
'../tools/skdiff_utils.cpp',
|
|
|
|
'../tools/skdiff_utils.h',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
2013-06-03 12:10:19 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
2013-07-22 18:46:45 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'skpdiff',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/skpdiff/skpdiff_main.cpp',
|
|
|
|
'../tools/skpdiff/SkDiffContext.cpp',
|
|
|
|
'../tools/skpdiff/SkImageDiffer.cpp',
|
|
|
|
'../tools/skpdiff/SkPMetric.cpp',
|
|
|
|
'../tools/skpdiff/skpdiff_util.cpp',
|
|
|
|
],
|
|
|
|
'include_dirs': [
|
2013-11-12 18:29:17 +00:00
|
|
|
'../src/core/', # needed for SkTLList.h
|
2014-08-13 17:36:06 +00:00
|
|
|
'../tools/', # needed for picture_utils::replace_char
|
2013-07-22 18:46:45 +00:00
|
|
|
],
|
|
|
|
'dependencies': [
|
2014-06-22 23:13:00 +00:00
|
|
|
'flags.gyp:flags',
|
2013-07-22 18:46:45 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
2014-08-13 17:36:06 +00:00
|
|
|
'tools.gyp:picture_utils',
|
2013-07-22 18:46:45 +00:00
|
|
|
],
|
|
|
|
'cflags': [
|
|
|
|
'-O3',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
|
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
|
|
|
'-lrt',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}],
|
|
|
|
['skia_opencl', {
|
|
|
|
'sources': [
|
|
|
|
'../tools/skpdiff/SkCLImageDiffer.cpp',
|
|
|
|
'../tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
[ 'skia_os == "mac"', {
|
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/OpenCL.framework',
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
|
|
|
'-lOpenCL',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
}, { # !skia_opencl
|
|
|
|
'sources': [
|
|
|
|
'../tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp',
|
|
|
|
],
|
|
|
|
}],
|
2012-12-05 20:13:12 +00:00
|
|
|
],
|
|
|
|
},
|
2014-01-02 19:42:15 +00:00
|
|
|
{
|
|
|
|
'target_name': 'skpmaker',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/skpmaker.cpp',
|
|
|
|
],
|
|
|
|
'include_dirs': [
|
|
|
|
'../src/core',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'flags.gyp:flags',
|
|
|
|
'skia_lib.gyp:skia_lib',
|
|
|
|
],
|
|
|
|
},
|
2012-12-05 20:13:12 +00:00
|
|
|
{
|
|
|
|
'target_name': 'skimagediff',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/skdiff.cpp',
|
|
|
|
'../tools/skdiff.h',
|
|
|
|
'../tools/skdiff_html.cpp',
|
|
|
|
'../tools/skdiff_html.h',
|
|
|
|
'../tools/skdiff_image.cpp',
|
|
|
|
'../tools/skdiff_utils.cpp',
|
|
|
|
'../tools/skdiff_utils.h',
|
2011-06-02 14:38:23 +00:00
|
|
|
],
|
|
|
|
'dependencies': [
|
2013-06-03 12:10:19 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
2011-06-02 14:38:23 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'skhello',
|
|
|
|
'type': 'executable',
|
|
|
|
'dependencies': [
|
2013-06-03 12:10:19 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
2013-06-17 15:39:43 +00:00
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
[ 'skia_os == "nacl"', {
|
|
|
|
'sources': [
|
|
|
|
'../platform_tools/nacl/src/nacl_hello.cpp',
|
|
|
|
],
|
|
|
|
}, {
|
|
|
|
'sources': [
|
|
|
|
'../tools/skhello.cpp',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'flags.gyp:flags',
|
2013-12-13 20:52:36 +00:00
|
|
|
'pdf.gyp:pdf',
|
2013-06-17 15:39:43 +00:00
|
|
|
],
|
|
|
|
}],
|
2011-06-02 14:38:23 +00:00
|
|
|
],
|
|
|
|
},
|
2014-03-03 19:18:39 +00:00
|
|
|
{
|
|
|
|
'target_name': 'skpinfo',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/skpinfo.cpp',
|
|
|
|
],
|
|
|
|
'include_dirs': [
|
|
|
|
'../src/core/',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'flags.gyp:flags',
|
|
|
|
'skia_lib.gyp:skia_lib',
|
|
|
|
],
|
|
|
|
},
|
2015-01-30 17:03:29 +00:00
|
|
|
{
|
|
|
|
'target_name': 'skp2svg',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../experimental/svg/skp2svg.cpp',
|
|
|
|
'../experimental/svg/SkSVGDevice.cpp',
|
|
|
|
'../experimental/svg/SkSVGDevice.h',
|
|
|
|
'../tools/LazyDecodeBitmap.cpp',
|
|
|
|
],
|
|
|
|
'include_dirs': [
|
|
|
|
'../src/core/',
|
|
|
|
'../src/lazy/',
|
|
|
|
'../tools/',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'flags.gyp:flags',
|
|
|
|
'skia_lib.gyp:skia_lib',
|
|
|
|
'xml.gyp:xml',
|
|
|
|
],
|
|
|
|
},
|
2014-04-28 13:19:34 +00:00
|
|
|
{
|
|
|
|
'target_name': 'gpuveto',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/gpuveto.cpp',
|
|
|
|
'../tools/LazyDecodeBitmap.cpp',
|
|
|
|
],
|
|
|
|
'include_dirs': [
|
|
|
|
'../src/core/',
|
|
|
|
'../src/images',
|
|
|
|
'../src/lazy',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'flags.gyp:flags',
|
|
|
|
'skia_lib.gyp:skia_lib',
|
|
|
|
],
|
|
|
|
},
|
2013-06-09 01:54:56 +00:00
|
|
|
{
|
|
|
|
'target_name': 'lua_app',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/lua/lua_app.cpp',
|
|
|
|
'../src/utils/SkLua.cpp',
|
|
|
|
],
|
2014-02-26 20:22:32 +00:00
|
|
|
'include_dirs': [
|
|
|
|
# Lua exposes GrReduceClip which in turn requires src/core for SkTLList
|
|
|
|
'../src/gpu/',
|
|
|
|
'../src/core/',
|
|
|
|
],
|
2013-06-09 01:54:56 +00:00
|
|
|
'dependencies': [
|
|
|
|
'effects.gyp:effects',
|
|
|
|
'images.gyp:images',
|
2013-12-13 20:52:36 +00:00
|
|
|
'lua.gyp:lua',
|
2013-06-09 01:54:56 +00:00
|
|
|
'pdf.gyp:pdf',
|
|
|
|
'ports.gyp:ports',
|
2013-12-13 20:52:36 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
2013-06-09 01:54:56 +00:00
|
|
|
],
|
|
|
|
},
|
2013-05-15 19:34:20 +00:00
|
|
|
{
|
|
|
|
'target_name': 'lua_pictures',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/lua/lua_pictures.cpp',
|
|
|
|
'../src/utils/SkLuaCanvas.cpp',
|
2013-05-22 15:13:18 +00:00
|
|
|
'../src/utils/SkLua.cpp',
|
2013-05-15 19:34:20 +00:00
|
|
|
],
|
2014-02-26 20:22:32 +00:00
|
|
|
'include_dirs': [
|
|
|
|
# Lua exposes GrReduceClip which in turn requires src/core for SkTLList
|
|
|
|
'../src/gpu/',
|
|
|
|
'../src/core/',
|
|
|
|
],
|
2013-05-15 19:34:20 +00:00
|
|
|
'dependencies': [
|
|
|
|
'effects.gyp:effects',
|
2013-12-13 20:52:36 +00:00
|
|
|
'flags.gyp:flags',
|
2013-05-15 19:34:20 +00:00
|
|
|
'images.gyp:images',
|
2013-12-13 20:52:36 +00:00
|
|
|
'lua.gyp:lua',
|
2013-05-15 19:34:20 +00:00
|
|
|
'tools.gyp:picture_renderer',
|
|
|
|
'tools.gyp:picture_utils',
|
2013-06-08 16:39:44 +00:00
|
|
|
'pdf.gyp:pdf',
|
2013-05-15 19:34:20 +00:00
|
|
|
'ports.gyp:ports',
|
2013-12-13 20:52:36 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
2013-05-15 19:34:20 +00:00
|
|
|
],
|
|
|
|
},
|
2012-06-12 14:56:36 +00:00
|
|
|
{
|
|
|
|
'target_name': 'render_pictures',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/render_pictures_main.cpp',
|
2012-07-16 17:29:16 +00:00
|
|
|
],
|
|
|
|
'include_dirs': [
|
2013-12-05 18:31:42 +00:00
|
|
|
'../src/core',
|
|
|
|
'../src/images',
|
|
|
|
'../src/lazy',
|
2012-07-16 17:29:16 +00:00
|
|
|
'../src/pipe/utils/',
|
2012-06-12 14:56:36 +00:00
|
|
|
],
|
|
|
|
'dependencies': [
|
2013-12-13 20:52:36 +00:00
|
|
|
'flags.gyp:flags',
|
2013-06-03 12:10:19 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
2012-08-01 17:53:29 +00:00
|
|
|
'tools.gyp:picture_renderer',
|
2012-06-22 18:24:56 +00:00
|
|
|
'tools.gyp:picture_utils',
|
|
|
|
],
|
|
|
|
},
|
2012-06-27 19:33:29 +00:00
|
|
|
{
|
|
|
|
'target_name': 'bench_pictures',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
2014-06-19 19:32:29 +00:00
|
|
|
'../bench/BenchLogger.cpp',
|
|
|
|
'../bench/BenchLogger.h',
|
2014-05-29 17:10:24 +00:00
|
|
|
'../tools/PictureBenchmark.cpp',
|
|
|
|
'../tools/PictureResultsWriter.h',
|
2012-07-09 19:37:40 +00:00
|
|
|
'../tools/bench_pictures_main.cpp',
|
2012-06-27 19:33:29 +00:00
|
|
|
],
|
|
|
|
'include_dirs': [
|
2013-12-05 18:31:42 +00:00
|
|
|
'../src/core/',
|
2012-06-27 19:33:29 +00:00
|
|
|
'../bench',
|
2013-03-04 19:56:21 +00:00
|
|
|
'../src/lazy/',
|
2012-06-27 19:33:29 +00:00
|
|
|
],
|
|
|
|
'dependencies': [
|
2014-06-20 18:29:20 +00:00
|
|
|
'timer',
|
|
|
|
'crash_handler',
|
2013-12-13 20:52:36 +00:00
|
|
|
'flags.gyp:flags',
|
2014-05-29 17:10:24 +00:00
|
|
|
'jsoncpp.gyp:jsoncpp',
|
2013-06-03 12:10:19 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
2012-08-01 17:53:29 +00:00
|
|
|
'tools.gyp:picture_renderer',
|
2014-06-18 18:44:15 +00:00
|
|
|
'tools.gyp:picture_utils',
|
2012-09-07 15:21:18 +00:00
|
|
|
],
|
2014-07-17 13:58:28 +00:00
|
|
|
'conditions': [
|
|
|
|
['skia_android_framework == 1', {
|
|
|
|
'libraries': [ '-lskia' ],
|
|
|
|
}],
|
|
|
|
],
|
2012-08-01 17:53:29 +00:00
|
|
|
},
|
2014-05-06 19:45:18 +00:00
|
|
|
{
|
|
|
|
'target_name': 'dump_record',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/dump_record.cpp',
|
2014-05-15 16:10:37 +00:00
|
|
|
'../tools/DumpRecord.cpp',
|
2014-05-06 19:45:18 +00:00
|
|
|
'../tools/LazyDecodeBitmap.cpp',
|
|
|
|
],
|
|
|
|
'include_dirs': [
|
|
|
|
'../src/core/',
|
|
|
|
'../src/images',
|
|
|
|
'../src/lazy',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
2014-06-20 18:29:20 +00:00
|
|
|
'timer',
|
2014-05-06 19:45:18 +00:00
|
|
|
'flags.gyp:flags',
|
|
|
|
'skia_lib.gyp:skia_lib',
|
|
|
|
],
|
|
|
|
},
|
2012-08-01 17:53:29 +00:00
|
|
|
{
|
2012-10-10 19:45:51 +00:00
|
|
|
'target_name': 'picture_renderer',
|
|
|
|
'type': 'static_library',
|
|
|
|
'sources': [
|
2014-05-09 03:18:41 +00:00
|
|
|
'../tools/image_expectations.h',
|
|
|
|
'../tools/image_expectations.cpp',
|
2013-07-16 18:21:46 +00:00
|
|
|
'../tools/LazyDecodeBitmap.cpp',
|
2012-11-07 18:01:46 +00:00
|
|
|
'../tools/PictureRenderer.h',
|
2012-07-26 17:27:57 +00:00
|
|
|
'../tools/PictureRenderer.cpp',
|
2013-03-04 16:41:06 +00:00
|
|
|
'../tools/PictureRenderingFlags.h',
|
|
|
|
'../tools/PictureRenderingFlags.cpp',
|
2012-11-07 18:01:46 +00:00
|
|
|
'../tools/CopyTilesRenderer.h',
|
|
|
|
'../tools/CopyTilesRenderer.cpp',
|
2012-07-26 17:27:57 +00:00
|
|
|
'../src/pipe/utils/SamplePipeControllers.h',
|
|
|
|
'../src/pipe/utils/SamplePipeControllers.cpp',
|
2012-10-10 19:45:51 +00:00
|
|
|
],
|
|
|
|
'include_dirs': [
|
2013-12-05 18:31:42 +00:00
|
|
|
'../src/core',
|
|
|
|
'../src/images',
|
|
|
|
'../src/lazy',
|
2012-10-10 19:45:51 +00:00
|
|
|
'../src/pipe/utils/',
|
|
|
|
'../src/utils/',
|
|
|
|
],
|
2013-12-13 20:52:36 +00:00
|
|
|
'direct_dependent_settings': {
|
|
|
|
'include_dirs': [
|
2014-05-09 03:18:41 +00:00
|
|
|
# needed for JSON headers used within image_expectations.h
|
2013-12-13 20:52:36 +00:00
|
|
|
'../third_party/externals/jsoncpp-chromium/overrides/include/',
|
|
|
|
'../third_party/externals/jsoncpp/include/',
|
|
|
|
],
|
|
|
|
},
|
2012-10-10 19:45:51 +00:00
|
|
|
'dependencies': [
|
2013-12-13 20:52:36 +00:00
|
|
|
'flags.gyp:flags',
|
|
|
|
'jsoncpp.gyp:jsoncpp',
|
2013-06-03 12:10:19 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
2012-07-26 17:27:57 +00:00
|
|
|
'tools.gyp:picture_utils',
|
2012-10-10 19:45:51 +00:00
|
|
|
],
|
2013-02-07 19:45:46 +00:00
|
|
|
'conditions': [
|
|
|
|
['skia_gpu == 1',
|
|
|
|
{
|
|
|
|
'include_dirs' : [
|
|
|
|
'../src/gpu',
|
|
|
|
],
|
2013-12-18 17:25:33 +00:00
|
|
|
'dependencies': [
|
|
|
|
'gputest.gyp:skgputest',
|
|
|
|
],
|
2014-11-13 19:12:41 +00:00
|
|
|
'export_dependent_settings': [
|
|
|
|
'gputest.gyp:skgputest',
|
|
|
|
],
|
2013-02-07 19:45:46 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
2012-07-26 17:27:57 +00:00
|
|
|
},
|
2012-11-01 19:52:38 +00:00
|
|
|
{
|
|
|
|
'target_name': 'render_pdfs',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/render_pdfs_main.cpp',
|
|
|
|
],
|
|
|
|
'include_dirs': [
|
2014-08-07 14:24:47 +00:00
|
|
|
'../src/core',
|
2012-11-01 19:52:38 +00:00
|
|
|
'../src/pipe/utils/',
|
|
|
|
'../src/utils/',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
2014-08-07 14:24:47 +00:00
|
|
|
'flags.gyp:flags',
|
2012-11-01 19:52:38 +00:00
|
|
|
'pdf.gyp:pdf',
|
2013-12-13 20:52:36 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
2012-11-01 19:52:38 +00:00
|
|
|
'tools.gyp:picture_utils',
|
2014-08-19 22:55:55 +00:00
|
|
|
'tools.gyp:proc_stats',
|
2012-11-01 19:52:38 +00:00
|
|
|
],
|
2013-03-08 18:00:16 +00:00
|
|
|
'conditions': [
|
2013-03-08 23:13:33 +00:00
|
|
|
['skia_win_debuggers_path and skia_os == "win"',
|
2013-03-08 18:00:16 +00:00
|
|
|
{
|
|
|
|
'dependencies': [
|
|
|
|
'tools.gyp:win_dbghelp',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
# VS static libraries don't have a linker option. We must set a global
|
|
|
|
# project linker option, or add it to each executable.
|
|
|
|
['skia_win_debuggers_path and skia_os == "win" and '
|
2013-03-08 23:13:33 +00:00
|
|
|
'skia_arch_width == 64',
|
2013-03-08 18:00:16 +00:00
|
|
|
{
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'AdditionalDependencies': [
|
|
|
|
'<(skia_win_debuggers_path)/x64/DbgHelp.lib',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
['skia_win_debuggers_path and skia_os == "win" and '
|
2013-03-08 23:13:33 +00:00
|
|
|
'skia_arch_width == 32',
|
2013-03-08 18:00:16 +00:00
|
|
|
{
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'AdditionalDependencies': [
|
|
|
|
'<(skia_win_debuggers_path)/DbgHelp.lib',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
2012-11-01 19:52:38 +00:00
|
|
|
},
|
2012-06-22 18:24:56 +00:00
|
|
|
{
|
|
|
|
'target_name': 'picture_utils',
|
|
|
|
'type': 'static_library',
|
|
|
|
'sources': [
|
|
|
|
'../tools/picture_utils.cpp',
|
2012-09-14 14:34:28 +00:00
|
|
|
'../tools/picture_utils.h',
|
2012-06-22 18:24:56 +00:00
|
|
|
],
|
|
|
|
'dependencies': [
|
2013-06-03 12:10:19 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
2012-06-12 14:56:36 +00:00
|
|
|
],
|
2013-05-15 20:01:07 +00:00
|
|
|
'direct_dependent_settings': {
|
|
|
|
'include_dirs': [
|
2014-06-18 21:32:48 +00:00
|
|
|
'../tools/',
|
2013-05-15 20:01:07 +00:00
|
|
|
],
|
|
|
|
},
|
2012-06-12 14:56:36 +00:00
|
|
|
},
|
2012-06-14 18:58:40 +00:00
|
|
|
{
|
|
|
|
'target_name': 'pinspect',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/pinspect.cpp',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
2013-12-13 20:52:36 +00:00
|
|
|
'flags.gyp:flags',
|
2013-06-03 12:10:19 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
2013-06-12 18:28:36 +00:00
|
|
|
'tools.gyp:picture_renderer',
|
2012-06-14 18:58:40 +00:00
|
|
|
],
|
|
|
|
},
|
2014-12-17 21:08:17 +00:00
|
|
|
{
|
|
|
|
'target_name': 'imgconv',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/imgconv.cpp',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'flags.gyp:flags',
|
|
|
|
'skia_lib.gyp:skia_lib',
|
|
|
|
],
|
|
|
|
},
|
2012-10-04 13:00:33 +00:00
|
|
|
{
|
|
|
|
'target_name': 'filter',
|
|
|
|
'type': 'executable',
|
|
|
|
'include_dirs' : [
|
|
|
|
'../src/core',
|
2013-06-13 21:25:45 +00:00
|
|
|
'../src/utils/debugger',
|
2012-10-04 13:00:33 +00:00
|
|
|
],
|
|
|
|
'sources': [
|
|
|
|
'../tools/filtermain.cpp',
|
2013-06-13 20:59:14 +00:00
|
|
|
'../src/utils/debugger/SkDrawCommand.h',
|
|
|
|
'../src/utils/debugger/SkDrawCommand.cpp',
|
|
|
|
'../src/utils/debugger/SkDebugCanvas.h',
|
|
|
|
'../src/utils/debugger/SkDebugCanvas.cpp',
|
|
|
|
'../src/utils/debugger/SkObjectParser.h',
|
|
|
|
'../src/utils/debugger/SkObjectParser.cpp',
|
2012-10-04 13:00:33 +00:00
|
|
|
],
|
|
|
|
'dependencies': [
|
2013-06-03 12:10:19 +00:00
|
|
|
'skia_lib.gyp:skia_lib',
|
2012-11-13 18:50:33 +00:00
|
|
|
'tools.gyp:picture_utils',
|
2012-10-04 13:00:33 +00:00
|
|
|
],
|
|
|
|
},
|
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
|
|
|
{
|
|
|
|
'target_name': 'test_image_decoder',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/test_image_decoder.cpp',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'skia_lib.gyp:skia_lib',
|
|
|
|
],
|
|
|
|
},
|
2014-08-11 18:33:51 +00:00
|
|
|
{
|
2014-08-19 22:55:55 +00:00
|
|
|
'target_name': 'proc_stats',
|
2014-08-11 18:33:51 +00:00
|
|
|
'type': 'static_library',
|
|
|
|
'sources': [
|
|
|
|
'../tools/ProcStats.h',
|
|
|
|
'../tools/ProcStats.cpp',
|
|
|
|
],
|
|
|
|
'direct_dependent_settings': {
|
|
|
|
'include_dirs': [ '../tools', ],
|
|
|
|
},
|
|
|
|
},
|
2014-11-13 20:52:35 +00:00
|
|
|
{
|
|
|
|
'target_name': 'test_public_includes',
|
|
|
|
'type': 'static_library',
|
2014-11-14 19:11:46 +00:00
|
|
|
# Ensure that our public headers don't have unused params so that clients
|
|
|
|
# (e.g. Android) that include us can build with these warnings enabled
|
|
|
|
'cflags!': [ '-Wno-unused-parameter' ],
|
2014-11-13 20:52:35 +00:00
|
|
|
'variables': {
|
|
|
|
'includes_to_test': [
|
|
|
|
'<(skia_include_path)/animator',
|
|
|
|
'<(skia_include_path)/c',
|
|
|
|
'<(skia_include_path)/config',
|
|
|
|
'<(skia_include_path)/core',
|
|
|
|
'<(skia_include_path)/effects',
|
|
|
|
'<(skia_include_path)/gpu',
|
|
|
|
'<(skia_include_path)/images',
|
|
|
|
'<(skia_include_path)/pathops',
|
2015-01-07 15:36:52 +00:00
|
|
|
'<(skia_include_path)/pdf',
|
2014-11-13 20:52:35 +00:00
|
|
|
'<(skia_include_path)/pipe',
|
|
|
|
'<(skia_include_path)/ports',
|
|
|
|
'<(skia_include_path)/svg',
|
|
|
|
'<(skia_include_path)/utils',
|
|
|
|
'<(skia_include_path)/views',
|
|
|
|
'<(skia_include_path)/xml',
|
|
|
|
],
|
|
|
|
'paths_to_ignore': [
|
|
|
|
'<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
|
2015-01-21 21:13:31 +00:00
|
|
|
'<(skia_include_path)/ports/SkAtomics_sync.h',
|
|
|
|
'<(skia_include_path)/ports/SkAtomics_win.h',
|
|
|
|
'<(skia_include_path)/ports/SkBarriers_arm.h',
|
|
|
|
'<(skia_include_path)/ports/SkBarriers_tsan.h',
|
|
|
|
'<(skia_include_path)/ports/SkBarriers_x86.h',
|
|
|
|
'<(skia_include_path)/ports/SkMutex_pthread.h',
|
|
|
|
'<(skia_include_path)/ports/SkMutex_win.h',
|
2014-11-13 20:52:35 +00:00
|
|
|
'<(skia_include_path)/ports/SkTypeface_mac.h',
|
|
|
|
'<(skia_include_path)/ports/SkTypeface_win.h',
|
|
|
|
'<(skia_include_path)/utils/ios',
|
|
|
|
'<(skia_include_path)/utils/mac',
|
|
|
|
'<(skia_include_path)/utils/win',
|
|
|
|
'<(skia_include_path)/utils/SkDebugUtils.h',
|
|
|
|
'<(skia_include_path)/utils/SkJSONCPP.h',
|
|
|
|
'<(skia_include_path)/views/animated',
|
|
|
|
'<(skia_include_path)/views/SkOSWindow_Android.h',
|
|
|
|
'<(skia_include_path)/views/SkOSWindow_iOS.h',
|
|
|
|
'<(skia_include_path)/views/SkOSWindow_Mac.h',
|
|
|
|
'<(skia_include_path)/views/SkOSWindow_NaCl.h',
|
|
|
|
'<(skia_include_path)/views/SkOSWindow_SDL.h',
|
|
|
|
'<(skia_include_path)/views/SkOSWindow_Unix.h',
|
|
|
|
'<(skia_include_path)/views/SkOSWindow_Win.h',
|
|
|
|
'<(skia_include_path)/views/SkWindow.h',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'include_dirs': [
|
|
|
|
'<@(includes_to_test)',
|
|
|
|
],
|
|
|
|
'sources': [
|
|
|
|
# unused_param_test.cpp is generated by the action below.
|
|
|
|
'<(INTERMEDIATE_DIR)/test_public_includes.cpp',
|
|
|
|
],
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'generate_includes_cpp',
|
|
|
|
'inputs': [
|
|
|
|
'../tools/generate_includes_cpp.py',
|
|
|
|
'<@(includes_to_test)',
|
|
|
|
# This causes the gyp generator on mac to fail
|
|
|
|
#'<@(paths_to_ignore)',
|
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(INTERMEDIATE_DIR)/test_public_includes.cpp',
|
|
|
|
],
|
|
|
|
'action': ['python', '../tools/generate_includes_cpp.py',
|
|
|
|
'--ignore', '<(paths_to_ignore)',
|
|
|
|
'<@(_outputs)', '<@(includes_to_test)'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2013-03-08 18:43:35 +00:00
|
|
|
],
|
|
|
|
'conditions': [
|
2013-06-20 17:15:05 +00:00
|
|
|
['skia_shared_lib',
|
|
|
|
{
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'sklua',
|
|
|
|
'product_name': 'skia',
|
|
|
|
'product_prefix': '',
|
|
|
|
'product_dir': '<(PRODUCT_DIR)/',
|
|
|
|
'type': 'shared_library',
|
|
|
|
'sources': [
|
|
|
|
'../src/utils/SkLuaCanvas.cpp',
|
|
|
|
'../src/utils/SkLua.cpp',
|
|
|
|
],
|
|
|
|
'include_dirs': [
|
2014-02-26 20:22:32 +00:00
|
|
|
# Lua exposes GrReduceClip which in turn requires src/core for SkTLList
|
|
|
|
'../src/gpu/',
|
|
|
|
'../src/core/',
|
2013-06-20 17:15:05 +00:00
|
|
|
'../third_party/lua/src/',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'lua.gyp:lua',
|
|
|
|
'pdf.gyp:pdf',
|
|
|
|
'skia_lib.gyp:skia_lib',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
['skia_os != "win"',
|
|
|
|
{
|
|
|
|
'ldflags': [
|
|
|
|
'-Wl,-rpath,\$$ORIGIN,--enable-new-dtags',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2013-03-08 23:13:33 +00:00
|
|
|
['skia_win_debuggers_path and skia_os == "win"',
|
2013-03-08 18:43:35 +00:00
|
|
|
{
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'win_dbghelp',
|
|
|
|
'type': 'static_library',
|
|
|
|
'defines': [
|
|
|
|
'SK_CDB_PATH="<(skia_win_debuggers_path)"',
|
|
|
|
],
|
|
|
|
'sources': [
|
|
|
|
'../tools/win_dbghelp.h',
|
|
|
|
'../tools/win_dbghelp.cpp',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2013-04-02 14:12:38 +00:00
|
|
|
['skia_os == "win"',
|
|
|
|
{
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'win_lcid',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/win_lcid.cpp',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2014-07-31 12:58:44 +00:00
|
|
|
['skia_os == "mac"',
|
|
|
|
{
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'create_test_font',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'../tools/create_test_font.cpp',
|
|
|
|
],
|
|
|
|
'include_dirs': [
|
|
|
|
'../src/core',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'flags.gyp:flags',
|
|
|
|
'skia_lib.gyp:skia_lib',
|
|
|
|
'resources',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2011-06-02 14:38:23 +00:00
|
|
|
],
|
|
|
|
}
|