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

Unified Diff: Source/core/svg/graphics/filters/SVGFilter.cpp

Issue 1235293003: Implement filter effects region for reference filters. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixes per review comments Created 5 years, 5 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
« no previous file with comments | « Source/core/svg/graphics/filters/SVGFilter.h ('k') | Source/platform/graphics/filters/FilterEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/graphics/filters/SVGFilter.cpp
diff --git a/Source/core/svg/graphics/filters/SVGFilter.cpp b/Source/core/svg/graphics/filters/SVGFilter.cpp
index 585443f3cff9c59bb983def2c3d4041964a5fcaa..7d1ef6b70f204c65be7b87a7feace5c2079e443c 100644
--- a/Source/core/svg/graphics/filters/SVGFilter.cpp
+++ b/Source/core/svg/graphics/filters/SVGFilter.cpp
@@ -28,7 +28,6 @@ namespace blink {
SVGFilter::SVGFilter(const IntRect& absoluteSourceDrawingRegion, const FloatRect& targetBoundingBox, const FloatRect& filterRegion, bool effectBBoxMode)
: Filter(targetBoundingBox, filterRegion, 1.0f)
, m_absoluteSourceDrawingRegion(absoluteSourceDrawingRegion)
- , m_targetBoundingBox(targetBoundingBox)
, m_effectBBoxMode(effectBBoxMode)
{
}
@@ -36,14 +35,14 @@ SVGFilter::SVGFilter(const IntRect& absoluteSourceDrawingRegion, const FloatRect
float SVGFilter::applyHorizontalScale(float value) const
{
if (m_effectBBoxMode)
- value *= m_targetBoundingBox.width();
+ value *= targetBoundingBox().width();
return Filter::applyHorizontalScale(value);
}
float SVGFilter::applyVerticalScale(float value) const
{
if (m_effectBBoxMode)
- value *= m_targetBoundingBox.height();
+ value *= targetBoundingBox().height();
return Filter::applyVerticalScale(value);
}
@@ -51,9 +50,9 @@ FloatPoint3D SVGFilter::resolve3dPoint(const FloatPoint3D& point) const
{
if (!m_effectBBoxMode)
return point;
- return FloatPoint3D(point.x() * m_targetBoundingBox.width() + m_targetBoundingBox.x(),
- point.y() * m_targetBoundingBox.height() + m_targetBoundingBox.y(),
- point.z() * sqrtf(m_targetBoundingBox.size().diagonalLengthSquared() / 2));
+ return FloatPoint3D(point.x() * targetBoundingBox().width() + targetBoundingBox().x(),
+ point.y() * targetBoundingBox().height() + targetBoundingBox().y(),
+ point.z() * sqrtf(targetBoundingBox().size().diagonalLengthSquared() / 2));
}
PassRefPtrWillBeRawPtr<SVGFilter> SVGFilter::create(const IntRect& absoluteSourceDrawingRegion, const FloatRect& targetBoundingBox, const FloatRect& filterRegion, bool effectBBoxMode)
« no previous file with comments | « Source/core/svg/graphics/filters/SVGFilter.h ('k') | Source/platform/graphics/filters/FilterEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698