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

Issue 2696603003: color: Towards ColorTransform optimizations and code generation (Closed)

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

Description

color: Towards ColorTransform optimizations and code generation Make ColorTransform store a list of individual steps, using the separate type ColorTransform::Step. Move the optimization of steps into a separate ColorTransformInternal::Simplify method, called after constructing the full chain. For readability, change ColorTransformInternal::Simplify to do double-dispatch by adding a "get subclass of type" method instead of using visitor pattern. Use a ScopedQcmsProfile to manage the lifetime of QCMS transforms, and add the ability to Join QCMS-based transform steps. Separate frequently-used SkColorSpace functions into a new file skia_color_space_util.cc/h. A follow-on patch will allow merging arbitrary SkColorSpaceTransferFns and add shader code generation. BUG=667966 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2696603003 Cr-Commit-Position: refs/heads/master@{#450647} Committed: https://chromium.googlesource.com/chromium/src/+/e2fc74b70d6ea11c08c6df1ef2b1372eccc5385f

Patch Set 1 #

Patch Set 2 : Minimize diff #

Patch Set 3 : Remove unneeded refactor #

Total comments: 5

Patch Set 4 : Review feedback #

Patch Set 5 : Add sub-class #

Total comments: 10

Patch Set 6 : Incorporate review feedback #

Patch Set 7 : Use using std:: for pow/log/exp/etc, fix skipped uses #

Patch Set 8 : Hopefully fix windows build #

Patch Set 9 : Keep fixing the windows build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+464 lines, -343 lines) Patch
M cc/output/color_lut_cache.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gfx/color_space.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M ui/gfx/color_space.cc View 1 2 2 chunks +2 lines, -21 lines 0 comments Download
M ui/gfx/color_transform.h View 1 2 3 4 5 6 7 2 chunks +9 lines, -8 lines 0 comments Download
M ui/gfx/color_transform.cc View 1 2 3 4 5 6 7 21 chunks +282 lines, -291 lines 0 comments Download
M ui/gfx/color_transform_fuzzer.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/color_transform_unittest.cc View 1 2 3 4 5 6 7 8 7 chunks +89 lines, -19 lines 0 comments Download
A ui/gfx/skia_color_space_util.h View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
A ui/gfx/skia_color_space_util.cc View 1 2 3 1 chunk +54 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 34 (21 generated)
ccameron
ptal I'm cleaning up a follow-on patch will allow merging arbitrary SkColorSpaceTransferFns and add shader ...
3 years, 10 months ago (2017-02-13 19:59:58 UTC) #3
hubbe
Could you please explain why you need the Step class? Replacing a virtual interface with ...
3 years, 10 months ago (2017-02-13 22:03:18 UTC) #4
ccameron
I don't feel that this was so much changing the structure of ColorTransform and ColorTransformInternal, ...
3 years, 10 months ago (2017-02-13 23:18:42 UTC) #5
chromium-reviews
On Mon, Feb 13, 2017 at 3:18 PM, <ccameron@chromium.org> wrote: > I don't feel that ...
3 years, 10 months ago (2017-02-13 23:46:55 UTC) #6
ccameron
On 2017/02/13 23:46:55, chromium-reviews wrote: > How about putting the steps inside ColorTransformInternal instead? > ...
3 years, 10 months ago (2017-02-14 09:53:32 UTC) #8
enne (OOO)
cc rubber stamp lgtm
3 years, 10 months ago (2017-02-14 17:36:31 UTC) #10
hubbe
Not sure why I want ColorTransform to be an interface so badly, but I like ...
3 years, 10 months ago (2017-02-14 19:04:51 UTC) #11
ccameron
Thanks -- updated https://codereview.chromium.org/2696603003/diff/80001/ui/gfx/color_transform.cc File ui/gfx/color_transform.cc (right): https://codereview.chromium.org/2696603003/diff/80001/ui/gfx/color_transform.cc#newcode233 ui/gfx/color_transform.cc:233: virtual ColorTransformFromLinear* GetFromLinear() { return nullptr; ...
3 years, 10 months ago (2017-02-15 00:11:31 UTC) #13
hubbe
lgtm
3 years, 10 months ago (2017-02-15 04:25:41 UTC) #14
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/2696603003/100001
3 years, 10 months ago (2017-02-15 04:35:07 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_trusty_blink_rel on master.tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_trusty_blink_rel/builds/5065)
3 years, 10 months ago (2017-02-15 04:46:13 UTC) #19
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/2696603003/160001
3 years, 10 months ago (2017-02-15 09:35:16 UTC) #31
commit-bot: I haz the power
3 years, 10 months ago (2017-02-15 10:00:11 UTC) #34
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/e2fc74b70d6ea11c08c6df1ef2b1...

Powered by Google App Engine
This is Rietveld 408576698