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

Unified Diff: Source/core/platform/graphics/filters/FEMorphology.cpp

Issue 14652016: Implement filter primitive subregion for reference CSS filters. This required refactoring determin… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix test failures: ReferenceFilterOperation should ref the Filter which owns its FilterEffects Created 7 years, 7 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: Source/core/platform/graphics/filters/FEMorphology.cpp
diff --git a/Source/core/platform/graphics/filters/FEMorphology.cpp b/Source/core/platform/graphics/filters/FEMorphology.cpp
index 1bc31aecc91fb89422b173bf857638c58eccb022..9d514fb1174dca24ea556ace51d26329c30c6005 100644
--- a/Source/core/platform/graphics/filters/FEMorphology.cpp
+++ b/Source/core/platform/graphics/filters/FEMorphology.cpp
@@ -89,10 +89,7 @@ float FEMorphology::radiusY() const
void FEMorphology::determineAbsolutePaintRect()
{
- FloatRect paintRect = inputEffect(0)->absolutePaintRect();
- Filter* filter = this->filter();
- paintRect.inflateX(filter->applyHorizontalScale(m_radiusX));
- paintRect.inflateY(filter->applyVerticalScale(m_radiusY));
+ FloatRect paintRect = mapRect(inputEffect(0)->absolutePaintRect());
if (clipsToBounds())
paintRect.intersect(maxEffectRect());
else
@@ -100,6 +97,14 @@ void FEMorphology::determineAbsolutePaintRect()
setAbsolutePaintRect(enclosingIntRect(paintRect));
}
+FloatRect FEMorphology::mapRect(const FloatRect& rect, bool)
+{
+ FloatRect result = rect;
+ result.inflateX(filter()->applyHorizontalScale(m_radiusX));
+ result.inflateY(filter()->applyVerticalScale(m_radiusY));
+ return result;
+}
+
bool FEMorphology::setRadiusY(float radiusY)
{
if (m_radiusY == radiusY)
« no previous file with comments | « Source/core/platform/graphics/filters/FEMorphology.h ('k') | Source/core/platform/graphics/filters/FEOffset.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698