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

Unified Diff: third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp

Issue 2341923002: Harmonize FilterEffect::mapRect and mapPaintRect (Closed)
Patch Set: Rebase 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/platform/graphics/filters/FEConvolveMatrix.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp b/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp
index ece3a8df1e077e65d2f04e5087fa1f14d868710d..fa9f9e99e5b62718abcdf835fc088201e9ca337a 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp
+++ b/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp
@@ -55,13 +55,13 @@ FEConvolveMatrix* FEConvolveMatrix::create(Filter* filter, const IntSize& kernel
preserveAlpha, kernelMatrix);
}
-FloatRect FEConvolveMatrix::mapPaintRect(const FloatRect& rect, bool forward) const
+FloatRect FEConvolveMatrix::mapEffect(const FloatRect& rect) const
{
+ if (!parametersValid())
+ return rect;
FloatRect result = rect;
- if (parametersValid()) {
- result.moveBy(forward ? -m_targetOffset : m_targetOffset - m_kernelSize);
- result.expand(FloatSize(m_kernelSize));
- }
+ result.moveBy(-m_targetOffset);
+ result.expand(FloatSize(m_kernelSize));
return result;
}

Powered by Google App Engine
This is Rietveld 408576698