Treat bad values passed to --images as a fatal error
authorscroggo <scroggo@google.com>
Thu, 28 Jan 2016 16:41:10 +0000 (08:41 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 28 Jan 2016 16:41:10 +0000 (08:41 -0800)
commit7579786f3bd5a8fda84a1abc45b16213c3371f93
treecbc6108da49f2ce75e629c6262f2ac711e2cb40f
parentd8ff5b336e586ad971ebcafa5fb2eb1e7ac95589
Treat bad values passed to --images as a fatal error

If an option is passed to --images that is either a non-existent path or
a folder with no images matching the supported types, assume this is
an error and exit, so they can supply a valid path instead.

Share code between DM and nanobench in SkCommonFlags.

nanobench now behaves more like DM - it will check a directory for
images that match the supported extensions.

Only consider image paths ending in RAW suffixes as images if
SK_CODE_DECODES_RAW is defined. This prevents us from seeing failure
to decode errors on platforms that cannot decode it.

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

Review URL: https://codereview.chromium.org/1611323004
bench/nanobench.cpp
dm/DM.cpp
gyp/codec.gyp
gyp/common_conditions.gypi
gyp/common_variables.gypi
tools/flags/SkCommonFlags.cpp
tools/flags/SkCommonFlags.h