Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Issue 2389983002: Refactored SkColorSpace and added in a Lab PCS GM (Closed)

Created:
4 years, 2 months ago by raftias
Modified:
4 years, 2 months ago
CC:
reviews_skia.org
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

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 Committed: https://skia.googlesource.com/skia/+/9488833428e83c93a7e6002f4d056084fb57112f

Patch Set 1 #

Patch Set 2 : fixed buildbot errors #

Patch Set 3 : disabled assert temporarily until DmSrcSink test is figured out, also fixed MSVC++ compiler error f… #

Patch Set 4 : use old ColorSpace logic for XYZ A2B0 profiles until A2B0-aware ColorSpaceXform is implemented #

Patch Set 5 : multiplied the matrix for the temporary XYZTRC profile from an A2B0 profile code to match what woul… #

Total comments: 15

Patch Set 6 : responding to comments #

Total comments: 50

Patch Set 7 : responding to comments #

Total comments: 26

Patch Set 8 : Refactored SkColorSpace and added in a Lab PCS GM #

Total comments: 14

Patch Set 9 : Responding to comments #

Total comments: 9

Patch Set 10 : responding to comments #

Total comments: 1

Patch Set 11 : merge fix #

Patch Set 12 : Merge branch 'master' into a2b0 #

Patch Set 13 : removed A2B->XYZ conversion in ICC, and changed SkJpegCodec to return false instead of assert if th… #

Patch Set 14 : migrated call from SkColorSpace_Base::makeLinearGamma() to SkColorSpace_XYZ::makeLinearGamma() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+969 lines, -525 lines) Patch
M bench/ColorCodecBench.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -2 lines 0 comments Download
M dm/DMSrcSink.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +13 lines, -3 lines 0 comments Download
M gm/gamut.cpp View 1 2 3 4 5 6 7 1 chunk +10 lines, -5 lines 0 comments Download
A gm/labpcsdemo.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +272 lines, -0 lines 0 comments Download
M gyp/core.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
A resources/icc_profiles/srgb_lab_pcs.icc View Binary file 0 comments Download
M samplecode/SampleApp.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -2 lines 0 comments Download
M src/codec/SkJpegCodec.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -2 lines 0 comments Download
M src/core/SkColorSpace.cpp View 1 2 3 4 5 6 7 8 9 10 14 chunks +43 lines, -93 lines 0 comments Download
M src/core/SkColorSpaceXform.cpp View 1 2 3 4 5 6 7 8 9 10 12 chunks +63 lines, -188 lines 0 comments Download
M src/core/SkColorSpaceXform_Base.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +8 lines, -8 lines 0 comments Download
A src/core/SkColorSpace_A2B.h View 1 2 3 4 5 6 7 8 9 1 chunk +102 lines, -0 lines 0 comments Download
A src/core/SkColorSpace_A2B.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +26 lines, -0 lines 0 comments Download
M src/core/SkColorSpace_Base.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +24 lines, -25 lines 0 comments Download
M src/core/SkColorSpace_ICC.cpp View 1 2 3 4 5 6 7 8 9 12 12 chunks +185 lines, -139 lines 0 comments Download
A src/core/SkColorSpace_XYZ.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +58 lines, -0 lines 0 comments Download
A src/core/SkColorSpace_XYZ.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +78 lines, -0 lines 0 comments Download
M src/effects/gradients/SkGradientShader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -2 lines 0 comments Download
M src/gpu/GrColorSpaceXform.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -1 line 0 comments Download
M tests/CodecTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -2 lines 0 comments Download
M tests/ColorSpaceTest.cpp View 1 2 3 4 5 6 7 8 9 5 chunks +17 lines, -7 lines 0 comments Download
M tests/ColorSpaceXformTest.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -25 lines 0 comments Download
M tests/SurfaceTest.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -2 lines 0 comments Download
M tests/TestConfigParsing.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +14 lines, -8 lines 0 comments Download
M tools/flags/SkCommonFlagsConfig.cpp View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +11 lines, -8 lines 0 comments Download
M tools/visualize_color_gamut.cpp View 1 2 3 4 5 6 2 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 71 (55 generated)
raftias
4 years, 2 months ago (2016-10-05 17:44:34 UTC) #24
msarett
Looks like this is headed in the right direction. Adding Brian and Mike for general ...
4 years, 2 months ago (2016-10-05 19:05:53 UTC) #26
raftias
https://codereview.chromium.org/2389983002/diff/80001/src/core/SkColorSpaceXform.cpp File src/core/SkColorSpaceXform.cpp (right): https://codereview.chromium.org/2389983002/diff/80001/src/core/SkColorSpaceXform.cpp#newcode51 src/core/SkColorSpaceXform.cpp:51: } On 2016/10/05 19:05:52, msarett wrote: > After we ...
4 years, 2 months ago (2016-10-06 14:43:04 UTC) #29
msarett
+mtklein I intend to take a closer look at this, though it might be useful ...
4 years, 2 months ago (2016-10-06 17:04:47 UTC) #33
msarett
https://codereview.chromium.org/2389983002/diff/100001/src/core/SkColorSpace.cpp File src/core/SkColorSpace.cpp (right): https://codereview.chromium.org/2389983002/diff/100001/src/core/SkColorSpace.cpp#newcode80 src/core/SkColorSpace.cpp:80: return sk_sp<SkColorSpace>(new SkColorSpace_XYZTRC(kNonStandard_SkGammaNamed, This line makes me feel good ...
4 years, 2 months ago (2016-10-07 01:48:36 UTC) #34
raftias
https://codereview.chromium.org/2389983002/diff/100001/src/core/SkColorSpace.cpp File src/core/SkColorSpace.cpp (right): https://codereview.chromium.org/2389983002/diff/100001/src/core/SkColorSpace.cpp#newcode174 src/core/SkColorSpace.cpp:174: sk_sp<SkColorSpace> SkColorSpace::makeLinearGamma() { On 2016/10/07 01:48:35, msarett wrote: > ...
4 years, 2 months ago (2016-10-10 20:37:33 UTC) #39
msarett
https://codereview.chromium.org/2389983002/diff/100001/src/core/SkColorSpace_A2B0.h File src/core/SkColorSpace_A2B0.h (right): https://codereview.chromium.org/2389983002/diff/100001/src/core/SkColorSpace_A2B0.h#newcode26 src/core/SkColorSpace_A2B0.h:26: SkGammaNamed aCurveNamed() const { return fACurveNamed; } On 2016/10/10 ...
4 years, 2 months ago (2016-10-11 13:40:31 UTC) #40
raftias
https://codereview.chromium.org/2389983002/diff/120001/src/core/SkColorSpace.cpp File src/core/SkColorSpace.cpp (right): https://codereview.chromium.org/2389983002/diff/120001/src/core/SkColorSpace.cpp#newcode428 src/core/SkColorSpace.cpp:428: // gammas, but also include other wacky features that ...
4 years, 2 months ago (2016-10-14 17:10:15 UTC) #41
msarett
Looks close. https://codereview.chromium.org/2389983002/diff/140001/gm/labpcsdemo.cpp File gm/labpcsdemo.cpp (right): https://codereview.chromium.org/2389983002/diff/140001/gm/labpcsdemo.cpp#newcode181 gm/labpcsdemo.cpp:181: for (int x = 0; x < ...
4 years, 2 months ago (2016-10-14 19:32:54 UTC) #42
raftias
https://codereview.chromium.org/2389983002/diff/140001/gm/labpcsdemo.cpp File gm/labpcsdemo.cpp (right): https://codereview.chromium.org/2389983002/diff/140001/gm/labpcsdemo.cpp#newcode181 gm/labpcsdemo.cpp:181: for (int x = 0; x < imageWidth; ++x) ...
4 years, 2 months ago (2016-10-14 20:41:03 UTC) #44
msarett
I *think* these are my final nits. https://codereview.chromium.org/2389983002/diff/160001/src/core/SkColorSpace.cpp File src/core/SkColorSpace.cpp (right): https://codereview.chromium.org/2389983002/diff/160001/src/core/SkColorSpace.cpp#newcode564 src/core/SkColorSpace.cpp:564: nit: remove ...
4 years, 2 months ago (2016-10-14 21:31:40 UTC) #45
raftias
https://codereview.chromium.org/2389983002/diff/160001/src/core/SkColorSpace.cpp File src/core/SkColorSpace.cpp (right): https://codereview.chromium.org/2389983002/diff/160001/src/core/SkColorSpace.cpp#newcode564 src/core/SkColorSpace.cpp:564: On 2016/10/14 21:31:39, msarett wrote: > nit: remove line ...
4 years, 2 months ago (2016-10-17 15:28:03 UTC) #46
msarett
lgtm https://codereview.chromium.org/2389983002/diff/180001/src/core/SkColorSpace_Base.h File src/core/SkColorSpace_Base.h (right): https://codereview.chromium.org/2389983002/diff/180001/src/core/SkColorSpace_Base.h#newcode217 src/core/SkColorSpace_Base.h:217: //friend class SkColorSpaceXform; nit: Remove line
4 years, 2 months ago (2016-10-17 15:32:30 UTC) #51
msarett
On 2016/10/17 15:32:30, msarett wrote: > lgtm > > https://codereview.chromium.org/2389983002/diff/180001/src/core/SkColorSpace_Base.h > File src/core/SkColorSpace_Base.h (right): > ...
4 years, 2 months ago (2016-10-18 17:00:58 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2389983002/260001
4 years, 2 months ago (2016-10-18 17:01:35 UTC) #69
commit-bot: I haz the power
4 years, 2 months ago (2016-10-18 17:02:57 UTC) #71
Message was sent while issue was closed.
Committed patchset #14 (id:260001) as
https://skia.googlesource.com/skia/+/9488833428e83c93a7e6002f4d056084fb57112f

Powered by Google App Engine
This is Rietveld 408576698