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

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

Issue 1326183002: Merge ReferenceFilter into Filter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Touchups; Rebase. Created 5 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
« no previous file with comments | « Source/core/svg/graphics/filters/SVGFilter.h ('k') | Source/platform/blink_platform.gypi » ('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 7d1ef6b70f204c65be7b87a7feace5c2079e443c..fd7830ced0b4346a7b3c427022f490905695d6d7 100644
--- a/Source/core/svg/graphics/filters/SVGFilter.cpp
+++ b/Source/core/svg/graphics/filters/SVGFilter.cpp
@@ -20,13 +20,12 @@
*/
#include "config.h"
-
#include "core/svg/graphics/filters/SVGFilter.h"
namespace blink {
-SVGFilter::SVGFilter(const IntRect& absoluteSourceDrawingRegion, const FloatRect& targetBoundingBox, const FloatRect& filterRegion, bool effectBBoxMode)
- : Filter(targetBoundingBox, filterRegion, 1.0f)
+SVGFilter::SVGFilter(const IntRect& absoluteSourceDrawingRegion, const FloatRect& referenceBox, const FloatRect& filterRegion, bool effectBBoxMode)
+ : Filter(referenceBox, filterRegion, 1.0f)
, m_absoluteSourceDrawingRegion(absoluteSourceDrawingRegion)
, m_effectBBoxMode(effectBBoxMode)
{
@@ -35,14 +34,14 @@ SVGFilter::SVGFilter(const IntRect& absoluteSourceDrawingRegion, const FloatRect
float SVGFilter::applyHorizontalScale(float value) const
{
if (m_effectBBoxMode)
- value *= targetBoundingBox().width();
+ value *= referenceBox().width();
return Filter::applyHorizontalScale(value);
}
float SVGFilter::applyVerticalScale(float value) const
{
if (m_effectBBoxMode)
- value *= targetBoundingBox().height();
+ value *= referenceBox().height();
return Filter::applyVerticalScale(value);
}
@@ -50,14 +49,14 @@ FloatPoint3D SVGFilter::resolve3dPoint(const FloatPoint3D& point) const
{
if (!m_effectBBoxMode)
return point;
- return FloatPoint3D(point.x() * targetBoundingBox().width() + targetBoundingBox().x(),
- point.y() * targetBoundingBox().height() + targetBoundingBox().y(),
- point.z() * sqrtf(targetBoundingBox().size().diagonalLengthSquared() / 2));
+ return FloatPoint3D(point.x() * referenceBox().width() + referenceBox().x(),
+ point.y() * referenceBox().height() + referenceBox().y(),
+ point.z() * sqrtf(referenceBox().size().diagonalLengthSquared() / 2));
}
-PassRefPtrWillBeRawPtr<SVGFilter> SVGFilter::create(const IntRect& absoluteSourceDrawingRegion, const FloatRect& targetBoundingBox, const FloatRect& filterRegion, bool effectBBoxMode)
+PassRefPtrWillBeRawPtr<SVGFilter> SVGFilter::create(const IntRect& absoluteSourceDrawingRegion, const FloatRect& referenceBox, const FloatRect& filterRegion, bool effectBBoxMode)
{
- return adoptRefWillBeNoop(new SVGFilter(absoluteSourceDrawingRegion, targetBoundingBox, filterRegion, effectBBoxMode));
+ return adoptRefWillBeNoop(new SVGFilter(absoluteSourceDrawingRegion, referenceBox, filterRegion, effectBBoxMode));
}
} // namespace blink
« no previous file with comments | « Source/core/svg/graphics/filters/SVGFilter.h ('k') | Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698