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

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

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/FilterEffect.h
diff --git a/Source/core/platform/graphics/filters/FilterEffect.h b/Source/core/platform/graphics/filters/FilterEffect.h
index 50e5396660e105d530e81d95ae38dea8beaaa383..cb79746b9bf36ec28334aad5ec6bf9f6cfc386d9 100644
--- a/Source/core/platform/graphics/filters/FilterEffect.h
+++ b/Source/core/platform/graphics/filters/FilterEffect.h
@@ -104,6 +104,19 @@ public:
virtual void determineAbsolutePaintRect();
+ // Mapping a rect forwards determines which which destination pixels a
+ // given source rect would affect. Mapping a rect backwards determines
+ // which pixels from the source rect would be required to fill a given
+ // destination rect. Note that these are not necessarily the inverse of
+ // each other. For example, for FEGaussianBlur, they are the same
+ // transformation.
+ virtual FloatRect mapRect(const FloatRect& rect, bool forward = true) { return rect; }
+ FloatRect mapRectRecursive(const FloatRect&);
+
+ // This is a recursive version of a backwards mapRect(), which also takes
+ // into account the filter primitive subregion of each effect.
+ FloatRect getSourceRect(const FloatRect& destRect, const FloatRect& clipRect);
+
virtual FilterEffectType filterEffectType() const { return FilterEffectTypeUnknown; }
virtual TextStream& externalRepresentation(TextStream&, int indention = 0) const;
@@ -141,6 +154,8 @@ public:
virtual void transformResultColorSpace(FilterEffect* in, const int) { in->transformResultColorSpace(m_operatingColorSpace); }
void transformResultColorSpace(ColorSpace);
+ FloatRect determineFilterPrimitiveSubregion();
+
protected:
FilterEffect(Filter*);
« no previous file with comments | « Source/core/platform/graphics/filters/Filter.h ('k') | Source/core/platform/graphics/filters/FilterEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698