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

Issue 134733016: Add support for converting Colors to linear RGB; Fix relevant filters (Closed)

Created:
6 years, 11 months ago by fs
Modified:
6 years, 11 months ago
CC:
blink-reviews, jamesr, krit, dsinclair, jbroman, danakj, Rik, pdr., rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Add support for converting Colors to linear RGB; Fix relevant filters Moves get{Linear,Device}RgbLUT out of ImageBuffer.cpp and into the (new) ColorSpace.cpp and a (new) namespace ColorSpaceUtilities. Implement ColorSpaceUtilities::convertColor and getConversionLUT, and use them in a new FilterEffect::adaptColorToOperatingColorSpace method, that derived classes can use. With the above infrastructure in place, use it in FEDropShadow to make sure the result of the (conceptual) flood operation is in correct color space (== the operating colorspace of the FEDropShadow). Also use it to transform the lighting-color of the lighting primitives. BUG=336440 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165767

Patch Set 1 #

Total comments: 3

Patch Set 2 : Add ColorSpaceUtilities. #

Patch Set 3 : Rebase. #

Total comments: 1

Patch Set 4 : Drop anon. NS; Use regular arrays for tables. #

Patch Set 5 : Rebase; update TestExpectations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -61 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feDiffuseLighting-linearrgb-lighting-color.svg View 1 chunk +16 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feDiffuseLighting-linearrgb-lighting-color-expected.svg View 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feDropShadow-linearrgb-flood-color.svg View 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feDropShadow-linearrgb-flood-color-expected.svg View 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feSpecularLight-linearrgb-lighting-color.svg View 1 chunk +16 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feSpecularLight-linearrgb-lighting-color-expected.svg View 1 chunk +14 lines, -0 lines 0 comments Download
M Source/platform/blink_platform.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/graphics/ColorSpace.h View 1 2 chunks +15 lines, -0 lines 0 comments Download
A Source/platform/graphics/ColorSpace.cpp View 1 2 3 1 chunk +107 lines, -0 lines 0 comments Download
M Source/platform/graphics/ImageBuffer.cpp View 1 3 chunks +4 lines, -52 lines 0 comments Download
M Source/platform/graphics/filters/FEDropShadow.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/platform/graphics/filters/FELighting.cpp View 4 chunks +9 lines, -7 lines 0 comments Download
M Source/platform/graphics/filters/FilterEffect.h View 2 chunks +3 lines, -0 lines 0 comments Download
M Source/platform/graphics/filters/FilterEffect.cpp View 1 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
fs
6 years, 11 months ago (2014-01-22 09:37:10 UTC) #1
Stephen Chennney
There are other places where we do color space conversions for filters, I think. Are ...
6 years, 11 months ago (2014-01-22 14:55:01 UTC) #2
Stephen Chennney
https://codereview.chromium.org/134733016/diff/1/Source/platform/graphics/filters/FilterEffect.h File Source/platform/graphics/filters/FilterEffect.h (right): https://codereview.chromium.org/134733016/diff/1/Source/platform/graphics/filters/FilterEffect.h#newcode187 Source/platform/graphics/filters/FilterEffect.h:187: Color adaptColorToOperatingColorSpace(const Color& deviceColor); This is the method that ...
6 years, 11 months ago (2014-01-22 14:56:00 UTC) #3
f(malita)
https://codereview.chromium.org/134733016/diff/1/Source/platform/graphics/Color.h File Source/platform/graphics/Color.h (right): https://codereview.chromium.org/134733016/diff/1/Source/platform/graphics/Color.h#newcode127 Source/platform/graphics/Color.h:127: Color convertToLinear() const; This is just a bit odd ...
6 years, 11 months ago (2014-01-22 15:09:32 UTC) #4
fs
On 2014/01/22 14:55:01, Stephen Chenney wrote: > There are other places where we do color ...
6 years, 11 months ago (2014-01-22 16:06:07 UTC) #5
f(malita)
On 2014/01/22 16:06:07, fs wrote: > https://codereview.chromium.org/134733016/diff/1/Source/platform/graphics/ColorSpace.h#newcode42 > > Source/platform/graphics/ColorSpace.h:42: const Vector<uint8_t>& > > getLinearRgbLUT(); ...
6 years, 11 months ago (2014-01-22 16:54:27 UTC) #6
Stephen Chennney
On 2014/01/22 16:54:27, Florin Malita wrote: > On 2014/01/22 16:06:07, fs wrote: > > > ...
6 years, 11 months ago (2014-01-22 20:44:54 UTC) #7
fs
Updated according to discussion.
6 years, 11 months ago (2014-01-23 11:24:37 UTC) #8
Stephen Chennney
Personally I would prefer that the ColorSpaceUtilities be a class in a separate file. That ...
6 years, 11 months ago (2014-01-23 16:04:04 UTC) #9
fs
On 2014/01/23 16:04:04, Stephen Chenney wrote: > Personally I would prefer that the ColorSpaceUtilities be ...
6 years, 11 months ago (2014-01-23 18:22:46 UTC) #10
fs
6 years, 11 months ago (2014-01-24 16:07:24 UTC) #11
Stephen Chennney
LGTM. It's a pleasure to work with you.
6 years, 11 months ago (2014-01-24 16:14:43 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/134733016/360001
6 years, 11 months ago (2014-01-24 16:46:33 UTC) #13
commit-bot: I haz the power
6 years, 11 months ago (2014-01-24 18:30:46 UTC) #14
Message was sent while issue was closed.
Change committed as 165767

Powered by Google App Engine
This is Rietveld 408576698