|
Lines 1-3
Source/WebCore/ChangeLog_sec1
|
|
|
1 |
2013-02-25 Stephen Chenney <schenney@chromium.org> |
| 2 |
|
| 3 |
feDisplacementMap filter gets color space wrong |
| 4 |
https://bugs.webkit.org/show_bug.cgi?id=105929 |
| 5 |
|
| 6 |
Reviewed by NOBODY (OOPS!). |
| 7 |
|
| 8 |
Tests: svg/filters/feDisplacementMap-color-interpolation-filters-expected.svg |
| 9 |
svg/filters/feDisplacementMap-color-interpolation-filters.svg |
| 10 |
svg/filters/feDisplacementMap-filterUnits-expected.svg |
| 11 |
svg/filters/feDisplacementMap-filterUnits.svg |
| 12 |
|
| 13 |
According to the spec, the SVG feDisplacementMap filter should not |
| 14 |
change the color space on its first input, and other vendors seem to |
| 15 |
agree that this also means that the output should be in the first |
| 16 |
input's color space. That makes sense: we are displacing the input, |
| 17 |
not otherwise manipulating colors. |
| 18 |
|
| 19 |
This change improves color space handling for filters by more |
| 20 |
explicitly tracking which color space is used for the filter's |
| 21 |
operation and which is used for the filter's result. It provides a |
| 22 |
means for filter effects to override the color-interpolation-filters |
| 23 |
property as defined by the spec. feFlood and feDisplacementMap use |
| 24 |
this new feature to enforce the spec requirements. |
| 25 |
|
| 26 |
* platform/graphics/filters/FEDisplacementMap.cpp: |
| 27 |
(WebCore::FEDisplacementMap::setResultColorSpace): Override the default color space with the |
| 28 |
same color space as the first input filter. |
| 29 |
(WebCore): |
| 30 |
(WebCore::FEDisplacementMap::transformResultColorSpace): Only transform the color space on |
| 31 |
the second filter input. |
| 32 |
(WebCore::FEDisplacementMap::platformApplySoftware): Make the application code more efficient, |
| 33 |
and give slightly better numerical accuracy. |
| 34 |
* platform/graphics/filters/FEDisplacementMap.h: |
| 35 |
(FEDisplacementMap): Declare setResultColorSpace. |
| 36 |
* platform/graphics/filters/FEFlood.cpp: |
| 37 |
(WebCore::FEFlood::platformApplySoftware): Remove the call that forces |
| 38 |
the result color space. We do it now in the setResultColorSpace. |
| 39 |
* platform/graphics/filters/FEFlood.h: |
| 40 |
(FEFlood): Add setResultColorSPace override that enforces sRGB color space. But not if using |
| 41 |
CG, which apparently does this this already internally. |
| 42 |
* platform/graphics/filters/FilterEffect.cpp: |
| 43 |
(WebCore::FilterEffect::FilterEffect): Rename m_colorSpace to m_operatingColorSpace. |
| 44 |
(WebCore::FilterEffect::apply): Allow filter effects to |
| 45 |
override the color space conversion of their inputs. |
| 46 |
(WebCore::FilterEffect::createImageBufferResult): Always create the |
| 47 |
image buffer with the result color space. |
| 48 |
* platform/graphics/filters/FilterEffect.h: |
| 49 |
(WebCore::FilterEffect::operatingColorSpace): New accessor. |
| 50 |
(WebCore::FilterEffect::setOperatingColorSpace): New accessor. |
| 51 |
(WebCore::FilterEffect::resultColorSpace): New accessor. |
| 52 |
(WebCore::FilterEffect::setResultColorSpace): New accessor. |
| 53 |
(FilterEffect): |
| 54 |
(WebCore::FilterEffect::transformResultColorSpace): A new virtual |
| 55 |
method that allows filter effects individual control over the color |
| 56 |
space conversion of their inputs. |
| 57 |
* platform/graphics/filters/SourceGraphic.h: |
| 58 |
(WebCore::SourceGraphic::SourceGraphic): Variable rename. |
| 59 |
* rendering/FilterEffectRenderer.cpp: |
| 60 |
(WebCore::FilterEffectRenderer::build): Use accessors to set color |
| 61 |
space to enable per-effect overrides. |
| 62 |
* rendering/svg/RenderSVGResourceFilter.cpp: |
| 63 |
(WebCore::RenderSVGResourceFilter::buildPrimitives): Use accessors to set color. |
| 64 |
|
| 1 |
2013-02-25 Kentaro Hara <haraken@chromium.org> |
65 |
2013-02-25 Kentaro Hara <haraken@chromium.org> |
| 2 |
|
66 |
|
| 3 |
Unreviewed build fix after r143965. |
67 |
Unreviewed build fix after r143965. |