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

Unified Diff: third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp

Issue 2128193004: Update FilterEffect colorspace on color-interpolation-filters changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp
diff --git a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp
index ba326a962ac16bc8be0de004b5bfe18e22f5a172..b88584ac69d9298d4b21ba3daa3aa9bc9f2c172f 100644
--- a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp
@@ -158,6 +158,11 @@ static EColorInterpolation colorInterpolationForElement(SVGElement& element, ECo
return parentColorInterpolation;
}
+ColorSpace SVGFilterBuilder::resolveColorSpace(EColorInterpolation colorInterpolation)
+{
+ return colorInterpolation == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB;
+}
+
void SVGFilterBuilder::buildGraph(Filter* filter, SVGFilterElement& filterElement, const FloatRect& referenceBox)
{
EColorInterpolation filterColorInterpolation = colorInterpolationForElement(filterElement, CI_AUTO);
@@ -177,7 +182,7 @@ void SVGFilterBuilder::buildGraph(Filter* filter, SVGFilterElement& filterElemen
effectElement->setStandardAttributes(effect);
effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilterPrimitiveStandardAttributes>(effectElement, filterElement.primitiveUnits()->currentValue()->enumValue(), referenceBox));
EColorInterpolation colorInterpolation = colorInterpolationForElement(*effectElement, filterColorInterpolation);
- effect->setOperatingColorSpace(colorInterpolation == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB);
+ effect->setOperatingColorSpace(resolveColorSpace(colorInterpolation));
if (effectElement->taintsOrigin(effect->inputsTaintOrigin()))
effect->setOriginTainted();
« no previous file with comments | « third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698