Stop creating CodecSrcs with unused scale
authorscroggo <scroggo@chromium.org>
Fri, 20 May 2016 15:38:54 +0000 (08:38 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 20 May 2016 15:38:54 +0000 (08:38 -0700)
commit9366aff1fa1ab8af1cddfc9a32b3aaa5ae2dd143
tree3a3b1a0e64de980d538c73f5d5f9dfe1e4f121f5
parent56f7dfebac52613cd043996038852cbe9efb3818
Stop creating CodecSrcs with unused scale

Only JPEG and WEBP support native scaling, so only create a CodecSrc
with a scale for those types.

If I run

    dm --src image --images resources

this cuts down the number of Srcs from 11063 to 8032. All of these
trimmed Srcs would have failed quickly for each Sink (3 Sinks with the
above flags), but this will avoid creating them.

It drops the runtime on my mac from 13.2s to 11.4s, for about a 14%
speedup.

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

Review-Url: https://codereview.chromium.org/1999103002
dm/DM.cpp