SkColorSpace_ICC: classify two entry tables as linear
authorMatt Sarett <msarett@google.com>
Wed, 17 May 2017 19:21:59 +0000 (15:21 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Wed, 17 May 2017 19:56:10 +0000 (19:56 +0000)
commite31d8a148467a56fd01e0ae0afa2a733f9dbf90e
tree9ffdf66a9adc3f9791f0b8ee336bf53fc2e0bc47
parent9ac995354428a916df81253e0c0c3f582db18976
SkColorSpace_ICC: classify two entry tables as linear

The bug linked in this CL was caused by the switch to SkJumper -
where we decided to stop interpolating table-lookups.

In this case, the image has tables with two entries: 0, 1.

This fixes the bug by optimizing away the table lookup for
these trivial no-op tables.  I think this is a good change
on its own.  We see these tables fairly regularly.

A more robust fix would expand "small" tables into larger
ones through interpolation.  Should we also do this?

Bug: 722855
Change-Id: I3881734c6f28b5519cbe593dd05cc7b6b1b8a9d0
Reviewed-on: https://skia-review.googlesource.com/17272
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
src/core/SkColorSpace_ICC.cpp