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

Unified Diff: Source/core/platform/graphics/filters/Filter.h

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 | « no previous file | Source/core/rendering/FilterEffectRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/filters/Filter.h
diff --git a/Source/core/platform/graphics/filters/Filter.h b/Source/core/platform/graphics/filters/Filter.h
index d410200b838b7527c5e9bf9bdbecebe211437540..51d0bb68092faaf978eb7c0134025a9bef8a8d1f 100644
--- a/Source/core/platform/graphics/filters/Filter.h
+++ b/Source/core/platform/graphics/filters/Filter.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
+ * Copyright (C) 2013 Google Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -31,7 +32,7 @@ class FilterEffect;
class Filter : public RefCounted<Filter> {
public:
- Filter() : m_renderingMode(Unaccelerated) { }
+ Filter(const AffineTransform& absoluteTransform) : m_absoluteTransform(absoluteTransform), m_renderingMode(Unaccelerated) { }
virtual ~Filter() { }
void setSourceImage(PassOwnPtr<ImageBuffer> sourceImage) { m_sourceImage = sourceImage; }
@@ -40,6 +41,9 @@ public:
FloatSize filterResolution() const { return m_filterResolution; }
void setFilterResolution(const FloatSize& filterResolution) { m_filterResolution = filterResolution; }
+ const AffineTransform& absoluteTransform() const { return m_absoluteTransform; }
+ FloatPoint mapAbsolutePointToLocalPoint(const FloatPoint& point) const { return m_absoluteTransform.inverse().mapPoint(point); }
+
RenderingMode renderingMode() const { return m_renderingMode; }
void setRenderingMode(RenderingMode renderingMode) { m_renderingMode = renderingMode; }
@@ -49,12 +53,12 @@ public:
virtual FloatRect sourceImageRect() const = 0;
virtual FloatRect filterRegion() const = 0;
- virtual FloatPoint mapAbsolutePointToLocalPoint(const FloatPoint&) const { return FloatPoint(); }
private:
OwnPtr<ImageBuffer> m_sourceImage;
FloatSize m_filterResolution;
RenderingMode m_renderingMode;
+ AffineTransform m_absoluteTransform;
};
} // namespace WebCore
« no previous file with comments | « no previous file | Source/core/rendering/FilterEffectRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698