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

Issue 2697413002: color: Add analytic transfer functions in shaders (Closed)

Created:
3 years, 10 months ago by ccameron
Modified:
3 years, 10 months ago
Reviewers:
marcheu, hubbe
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

color: Add analytic transfer functions in shaders Create a separate ColorTransformStep for SkColorSpaceTransferFn-based transfer functions. Add helpers SkTransferFnsApproximatelyCancel and SkMatrixIsApproximatelyIdentity, which will empirically test if two transfer functions nearly match. The threshold for "nearly match" is chosen such that BT709 (the most common video transfer function) and sRGB (the most common monitor transfer function) are considered to "approximately cancel out". Add code to generate shader source for SkColorSpaceTransferFn-based transfer functions. BUG=667966 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2697413002 Cr-Commit-Position: refs/heads/master@{#452000} Committed: https://chromium.googlesource.com/chromium/src/+/8958419e9b0c522ad702b225c9348d2486a456c9

Patch Set 1 #

Total comments: 9

Patch Set 2 : Add rec601 for non-cancelling tests #

Patch Set 3 : More tests #

Patch Set 4 : Add tests for shader source #

Patch Set 5 : Rebase, use +1.8e for full precision #

Patch Set 6 : Add source unit test #

Patch Set 7 : Dont use ICC profile in shader source test #

Patch Set 8 : Disable on android #

Patch Set 9 : Disable on android #

Unified diffs Side-by-side diffs Delta from patch set Stats (+337 lines, -73 lines) Patch
M cc/output/gl_renderer_unittest.cc View 1 2 3 chunks +37 lines, -1 line 0 comments Download
M ui/gfx/color_transform.cc View 1 2 3 4 8 chunks +120 lines, -68 lines 0 comments Download
M ui/gfx/color_transform_unittest.cc View 1 2 3 4 5 6 7 2 chunks +146 lines, -0 lines 0 comments Download
M ui/gfx/skia_color_space_util.h View 1 chunk +8 lines, -1 line 0 comments Download
M ui/gfx/skia_color_space_util.cc View 2 chunks +26 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 35 (19 generated)
ccameron
I spent a while trying to write "SkTranfserFn almost cancel" functions analytically, but found that ...
3 years, 10 months ago (2017-02-16 22:57:28 UTC) #3
hubbe
https://codereview.chromium.org/2697413002/diff/1/ui/gfx/color_transform.cc File ui/gfx/color_transform.cc (right): https://codereview.chromium.org/2697413002/diff/1/ui/gfx/color_transform.cc#newcode393 ui/gfx/color_transform.cc:393: void AppendShaderSourceChannel(std::string* result, const char* value) { Please add ...
3 years, 10 months ago (2017-02-16 23:06:38 UTC) #4
ccameron
Updated with a handful more tests. For the "bunch o different transfer functions", the generated ...
3 years, 10 months ago (2017-02-16 23:51:58 UTC) #6
hubbe
https://codereview.chromium.org/2697413002/diff/1/ui/gfx/color_transform.cc File ui/gfx/color_transform.cc (right): https://codereview.chromium.org/2697413002/diff/1/ui/gfx/color_transform.cc#newcode393 ui/gfx/color_transform.cc:393: void AppendShaderSourceChannel(std::string* result, const char* value) { On 2017/02/16 ...
3 years, 10 months ago (2017-02-17 00:06:00 UTC) #7
hubbe
On 2017/02/17 00:06:00, hubbe wrote: > https://codereview.chromium.org/2697413002/diff/1/ui/gfx/color_transform.cc > File ui/gfx/color_transform.cc (right): > > https://codereview.chromium.org/2697413002/diff/1/ui/gfx/color_transform.cc#newcode393 > ...
3 years, 10 months ago (2017-02-17 00:07:59 UTC) #8
chromium-reviews
PS: If we can't find a second opinion, I'm ok with checking it in and ...
3 years, 10 months ago (2017-02-17 00:09:09 UTC) #9
ccameron
On 2017/02/17 00:09:09, chromium-reviews wrote: > > > > > Is the compiler smart enough ...
3 years, 10 months ago (2017-02-19 22:28:07 UTC) #12
ccameron
(actually ccing marcheu@)
3 years, 10 months ago (2017-02-19 22:28:36 UTC) #14
hubbe
https://codereview.chromium.org/2697413002/diff/1/ui/gfx/color_transform.cc File ui/gfx/color_transform.cc (right): https://codereview.chromium.org/2697413002/diff/1/ui/gfx/color_transform.cc#newcode393 ui/gfx/color_transform.cc:393: void AppendShaderSourceChannel(std::string* result, const char* value) { > it ...
3 years, 10 months ago (2017-02-20 05:01:02 UTC) #17
ccameron
Updated https://codereview.chromium.org/2697413002/diff/1/ui/gfx/color_transform.cc File ui/gfx/color_transform.cc (right): https://codereview.chromium.org/2697413002/diff/1/ui/gfx/color_transform.cc#newcode393 ui/gfx/color_transform.cc:393: void AppendShaderSourceChannel(std::string* result, const char* value) { On ...
3 years, 10 months ago (2017-02-21 22:32:42 UTC) #19
hubbe
LGTM (I'm still hoping for a second opinion on the shader code, but I'm fine ...
3 years, 10 months ago (2017-02-21 22:37:28 UTC) #21
marcheu
On 2017/02/19 22:28:07, ccameron wrote: > On 2017/02/17 00:09:09, chromium-reviews wrote: > > > > ...
3 years, 10 months ago (2017-02-21 22:48:52 UTC) #22
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/2697413002/120001
3 years, 10 months ago (2017-02-22 02:45:24 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/387107)
3 years, 10 months ago (2017-02-22 04:01:08 UTC) #29
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/2697413002/160001
3 years, 10 months ago (2017-02-22 09:50:11 UTC) #32
commit-bot: I haz the power
3 years, 10 months ago (2017-02-22 11:48:15 UTC) #35
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/8958419e9b0c522ad702b225c934...

Powered by Google App Engine
This is Rietveld 408576698