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

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

Issue 2313583002: Revert of Revamp filter primitive region calculations for Filter Effects (Closed)
Patch Set: 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 c44f731220e1586fb447203da300f79dff3e1419..0bf262363c3a94929b1ebcc1098e18204418cb50 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp
@@ -322,14 +322,15 @@
const double effectiveZoom = 1.0; // Deliberately ignore zoom on the canvas element
filterEffectBuilder->build(styleResolutionHost, filterStyle->filter(), effectiveZoom, &floatCanvasSize, &fillPaintForFilter, &strokePaintForFilter);
- 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();
- }
+ 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();
}
}

Powered by Google App Engine
This is Rietveld 408576698