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

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

Issue 14701012: Refactor m_absoluteTransform out of SVGFilter and into base class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix copyrights Created 7 years, 8 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/rendering/FilterEffectRenderer.cpp ('k') | Source/core/svg/graphics/filters/SVGFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/graphics/filters/SVGFEImage.cpp
diff --git a/Source/core/svg/graphics/filters/SVGFEImage.cpp b/Source/core/svg/graphics/filters/SVGFEImage.cpp
index 2ccf20ec9e95a508bdd8586b6bae2b461cc9d970..fc2f78e07f41f000654223e7f229f6408107e12f 100644
--- a/Source/core/svg/graphics/filters/SVGFEImage.cpp
+++ b/Source/core/svg/graphics/filters/SVGFEImage.cpp
@@ -36,7 +36,6 @@
#include "core/svg/SVGPreserveAspectRatio.h"
#include "core/svg/SVGStyledElement.h"
#include "core/svg/SVGURIReference.h"
-#include "core/svg/graphics/filters/SVGFilter.h"
namespace WebCore {
@@ -68,15 +67,13 @@ PassRefPtr<FEImage> FEImage::createWithIRIReference(Filter* filter, Document* do
void FEImage::determineAbsolutePaintRect()
{
- SVGFilter* svgFilter = static_cast<SVGFilter*>(filter());
-
- FloatRect paintRect = svgFilter->absoluteTransform().mapRect(filterPrimitiveSubregion());
+ FloatRect paintRect = filter()->absoluteTransform().mapRect(filterPrimitiveSubregion());
FloatRect srcRect;
if (m_image) {
srcRect.setSize(m_image->size());
m_preserveAspectRatio.transformRect(paintRect, srcRect);
} else if (RenderObject* renderer = referencedRenderer())
- srcRect = svgFilter->absoluteTransform().mapRect(renderer->repaintRectInLocalCoordinates());
+ srcRect = filter()->absoluteTransform().mapRect(renderer->repaintRectInLocalCoordinates());
if (clipsToBounds())
paintRect.intersect(maxEffectRect());
@@ -105,12 +102,11 @@ void FEImage::applySoftware()
if (!resultImage)
return;
- SVGFilter* svgFilter = static_cast<SVGFilter*>(filter());
- FloatRect destRect = svgFilter->absoluteTransform().mapRect(filterPrimitiveSubregion());
+ FloatRect destRect = filter()->absoluteTransform().mapRect(filterPrimitiveSubregion());
FloatRect srcRect;
if (renderer)
- srcRect = svgFilter->absoluteTransform().mapRect(renderer->repaintRectInLocalCoordinates());
+ srcRect = filter()->absoluteTransform().mapRect(renderer->repaintRectInLocalCoordinates());
else {
srcRect = FloatRect(FloatPoint(), m_image->size());
m_preserveAspectRatio.transformRect(destRect, srcRect);
@@ -123,7 +119,7 @@ void FEImage::applySoftware()
setResultColorSpace(ColorSpaceDeviceRGB);
if (renderer) {
- const AffineTransform& absoluteTransform = svgFilter->absoluteTransform();
+ const AffineTransform& absoluteTransform = filter()->absoluteTransform();
resultImage->context()->concatCTM(absoluteTransform);
SVGElement* contextNode = toSVGElement(renderer->node());
« no previous file with comments | « Source/core/rendering/FilterEffectRenderer.cpp ('k') | Source/core/svg/graphics/filters/SVGFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698