OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * Copyright (C) 2013 Google Inc. All rights reserved. | 7 * Copyright (C) 2013 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
86 } | 86 } |
87 | 87 |
88 bool FEDisplacementMap::setScale(float scale) | 88 bool FEDisplacementMap::setScale(float scale) |
89 { | 89 { |
90 if (m_scale == scale) | 90 if (m_scale == scale) |
91 return false; | 91 return false; |
92 m_scale = scale; | 92 m_scale = scale; |
93 return true; | 93 return true; |
94 } | 94 } |
95 | 95 |
96 void FEDisplacementMap::setResultColorSpace(ColorSpace) | |
97 { | |
98 // Spec: The 'color-interpolation-filters' property only applies to the 'in2 ' source image | |
99 // and does not apply to the 'in' source image. The 'in' source image must r emain in its | |
Stephen White
2015/04/20 15:35:43
This points out that there may be a bug in FEDispl
fs
2015/04/20 15:59:29
Yes, I noticed this discrepancy too... The commit
| |
100 // current color space. | |
101 // The result is in that smae color space because it is a displacement of th e 'in' image. | |
102 FilterEffect::setResultColorSpace(inputEffect(0)->resultColorSpace()); | |
103 } | |
104 | |
105 static SkDisplacementMapEffect::ChannelSelectorType toSkiaMode(ChannelSelectorTy pe type) | 96 static SkDisplacementMapEffect::ChannelSelectorType toSkiaMode(ChannelSelectorTy pe type) |
106 { | 97 { |
107 switch (type) { | 98 switch (type) { |
108 case CHANNEL_R: | 99 case CHANNEL_R: |
109 return SkDisplacementMapEffect::kR_ChannelSelectorType; | 100 return SkDisplacementMapEffect::kR_ChannelSelectorType; |
110 case CHANNEL_G: | 101 case CHANNEL_G: |
111 return SkDisplacementMapEffect::kG_ChannelSelectorType; | 102 return SkDisplacementMapEffect::kG_ChannelSelectorType; |
112 case CHANNEL_B: | 103 case CHANNEL_B: |
113 return SkDisplacementMapEffect::kB_ChannelSelectorType; | 104 return SkDisplacementMapEffect::kB_ChannelSelectorType; |
114 case CHANNEL_A: | 105 case CHANNEL_A: |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 rect = mapPaintRect(rect, false); | 169 rect = mapPaintRect(rect, false); |
179 rect = inputEffect(0)->determineAbsolutePaintRect(rect); | 170 rect = inputEffect(0)->determineAbsolutePaintRect(rect); |
180 rect = mapPaintRect(rect, true); | 171 rect = mapPaintRect(rect, true); |
181 rect.intersect(requestedRect); | 172 rect.intersect(requestedRect); |
182 | 173 |
183 addAbsolutePaintRect(rect); | 174 addAbsolutePaintRect(rect); |
184 return rect; | 175 return rect; |
185 } | 176 } |
186 | 177 |
187 } // namespace blink | 178 } // namespace blink |
OLD | NEW |