Index: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp |
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp |
index 466850eef937b89985b5aa6c4ca66ac64a201b5e..e52ec3ef62572033798a6c976166212e8fab77b1 100644 |
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp |
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp |
@@ -354,12 +354,16 @@ SkImageFilter* CanvasRenderingContext2DState::getFilter(Element* styleResolution |
StyleResolverState resolverState(styleResolutionHost->document(), styleResolutionHost, filterStyle.get()); |
resolverState.setStyle(filterStyle); |
- // TODO(junov): crbug.com/502877 Feed m_fillStyle and m_strokeStyle into FillPaint and |
- // StrokePaint respectively for filters that reference SVG. |
StyleBuilder::applyProperty(CSSPropertyWebkitFilter, resolverState, m_filterValue.get()); |
RefPtrWillBeRawPtr<FilterEffectBuilder> filterEffectBuilder = FilterEffectBuilder::create(); |
+ SkPaint fillPaint; |
Justin Novosad
2016/01/11 19:52:42
Is there a reason why we need to create a new pain
ajuma
2016/01/11 21:33:08
Added a comment and changed the variable names.
|
+ SkPaint strokePaint; |
+ m_fillStyle->applyToPaint(fillPaint); |
+ m_strokeStyle->applyToPaint(strokePaint); |
+ fillPaint.setColor(m_fillStyle->paintColor()); |
+ strokePaint.setColor(m_strokeStyle->paintColor()); |
const double effectiveZoom = 1.0; // Deliberately ignore zoom on the canvas element |
- filterEffectBuilder->build(styleResolutionHost, filterStyle->filter(), effectiveZoom); |
+ filterEffectBuilder->build(styleResolutionHost, filterStyle->filter(), effectiveZoom, &fillPaint, &strokePaint); |
SkiaImageFilterBuilder imageFilterBuilder; |
RefPtrWillBeRawPtr<FilterEffect> lastEffect = filterEffectBuilder->lastEffect(); |