Refactored SkColorSpace and added in a Lab PCS GM
authorraftias <raftias@google.com>
Tue, 18 Oct 2016 17:02:51 +0000 (10:02 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 18 Oct 2016 17:02:52 +0000 (10:02 -0700)
commit9488833428e83c93a7e6002f4d056084fb57112f
tree725cd5f30d3b685b3e7d18eb68a551d9b76ad5df
parentb9eb887f8baa3dcf89b0106a799aff03b5c1cbba
Refactored SkColorSpace and added in a Lab PCS GM

The refactoring breaks off A2B0 tag support into a separate
subclass of SkColorSpace_Base, while keeping the current
(besides CLUT) functionality in a XYZTRC subclass.

ICC profile loading is now aware of this and creates the A2B0
subclass when SkColorSpace::NewICC() is called on a profile
in need of the A2B0 functionality.

The LabPCSDemo GM loads a .icc profile containing a LAB PCS and
then runs a Lab->XYZ conversion on an image using it so we can
display it and test out the A2B0 SkColorSpace functionality,
sans a/b/m-curves, as well as the Lab->XYZ conversion code.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2389983002

Review-Url: https://codereview.chromium.org/2389983002
26 files changed:
bench/ColorCodecBench.cpp
dm/DMSrcSink.cpp
gm/gamut.cpp
gm/labpcsdemo.cpp [new file with mode: 0644]
gyp/core.gypi
resources/icc_profiles/srgb_lab_pcs.icc [new file with mode: 0644]
samplecode/SampleApp.cpp
src/codec/SkJpegCodec.cpp
src/core/SkColorSpace.cpp
src/core/SkColorSpaceXform.cpp
src/core/SkColorSpaceXform_Base.h
src/core/SkColorSpace_A2B.cpp [new file with mode: 0644]
src/core/SkColorSpace_A2B.h [new file with mode: 0644]
src/core/SkColorSpace_Base.h
src/core/SkColorSpace_ICC.cpp
src/core/SkColorSpace_XYZ.cpp [new file with mode: 0644]
src/core/SkColorSpace_XYZ.h [new file with mode: 0644]
src/effects/gradients/SkGradientShader.cpp
src/gpu/GrColorSpaceXform.cpp
tests/CodecTest.cpp
tests/ColorSpaceTest.cpp
tests/ColorSpaceXformTest.cpp
tests/SurfaceTest.cpp
tests/TestConfigParsing.cpp
tools/flags/SkCommonFlagsConfig.cpp
tools/visualize_color_gamut.cpp