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 0bf262363c3a94929b1ebcc1098e18204418cb50..c44f731220e1586fb447203da300f79dff3e1419 100644 |
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp |
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp |
@@ -322,15 +322,14 @@ SkImageFilter* CanvasRenderingContext2DState::getFilter(Element* styleResolution |
const double effectiveZoom = 1.0; // Deliberately ignore zoom on the canvas element |
filterEffectBuilder->build(styleResolutionHost, filterStyle->filter(), effectiveZoom, &floatCanvasSize, &fillPaintForFilter, &strokePaintForFilter); |
- FilterEffect* lastEffect = filterEffectBuilder->lastEffect(); |
- if (lastEffect) { |
- lastEffect->determineFilterPrimitiveSubregion(); |
- } |
- m_resolvedFilter = SkiaImageFilterBuilder::build(lastEffect, ColorSpaceDeviceRGB); |
- if (m_resolvedFilter) { |
- updateFilterReferences(toHTMLCanvasElement(styleResolutionHost), context, filterStyle->filter()); |
- if (lastEffect->originTainted()) |
- context->setOriginTainted(); |
+ if (FilterEffect* lastEffect = filterEffectBuilder->lastEffect()) { |
+ lastEffect->determineMaximumEffectRect(DetermineMaxEffectRectNone); |
+ m_resolvedFilter = SkiaImageFilterBuilder::build(lastEffect, ColorSpaceDeviceRGB); |
+ if (m_resolvedFilter) { |
+ updateFilterReferences(toHTMLCanvasElement(styleResolutionHost), context, filterStyle->filter()); |
+ if (lastEffect->originTainted()) |
+ context->setOriginTainted(); |
+ } |
} |
} |