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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp

Issue 2303703002: Revamp filter primitive region calculations for Filter Effects (Closed)
Patch Set: Baselines again; Manual for mac10.11-retina Created 4 years, 3 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
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();
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698