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

Unified Diff: third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h

Issue 2303703002: Revamp filter primitive region calculations for Filter Effects (Closed)
Patch Set: Baselines again; Manual for mac10.11-retina Created 4 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
Index: third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h b/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h
index 4e3d9053aba3d4033966369597c7ac1dc33c266c..cc2db4a8d747b2d3d06906b74051fe6456a5d721 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h
+++ b/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h
@@ -50,13 +50,13 @@ enum FilterEffectType {
FilterEffectTypeSourceInput
};
-enum DetermineSubregionFlag {
- DetermineSubregionNone = 0,
+enum DetermineMaxEffectRectFlag {
+ DetermineMaxEffectRectNone = 0,
MapRectForward = 1,
ClipToFilterRegion = 1 << 1
};
-typedef int DetermineSubregionFlags;
+typedef int DetermineMaxEffectRectFlags;
class PLATFORM_EXPORT FilterEffect : public GarbageCollectedFinalized<FilterEffect> {
WTF_MAKE_NONCOPYABLE(FilterEffect);
@@ -78,7 +78,6 @@ public:
IntRect absolutePaintRect() const { return m_absolutePaintRect; }
FloatRect maxEffectRect() const { return m_maxEffectRect; }
- void setMaxEffectRect(const FloatRect& maxEffectRect) { m_maxEffectRect = maxEffectRect; }
virtual sk_sp<SkImageFilter> createImageFilter();
virtual sk_sp<SkImageFilter> createImageFilterWithoutValidation();
@@ -104,27 +103,9 @@ public:
virtual TextStream& externalRepresentation(TextStream&, int indention = 0) const;
- // The following functions are SVG specific and will move to LayoutSVGResourceFilterPrimitive.
- // See bug https://bugs.webkit.org/show_bug.cgi?id=45614.
- bool hasX() const { return m_hasX; }
- void setHasX(bool value) { m_hasX = value; }
-
- bool hasY() const { return m_hasY; }
- void setHasY(bool value) { m_hasY = value; }
-
- bool hasWidth() const { return m_hasWidth; }
- void setHasWidth(bool value) { m_hasWidth = value; }
-
- bool hasHeight() const { return m_hasHeight; }
- void setHasHeight(bool value) { m_hasHeight = value; }
-
FloatRect filterPrimitiveSubregion() const { return m_filterPrimitiveSubregion; }
void setFilterPrimitiveSubregion(const FloatRect& filterPrimitiveSubregion) { m_filterPrimitiveSubregion = filterPrimitiveSubregion; }
- const FloatRect& effectBoundaries() const { return m_effectBoundaries; }
- void setEffectBoundaries(const FloatRect& effectBoundaries) { m_effectBoundaries = effectBoundaries; }
- FloatRect applyEffectBoundaries(const FloatRect&) const;
-
Filter* getFilter() { return m_filter; }
const Filter* getFilter() const { return m_filter; }
@@ -134,7 +115,7 @@ public:
ColorSpace operatingColorSpace() const { return m_operatingColorSpace; }
virtual void setOperatingColorSpace(ColorSpace colorSpace) { m_operatingColorSpace = colorSpace; }
- FloatRect determineFilterPrimitiveSubregion(DetermineSubregionFlags = DetermineSubregionNone);
+ FloatRect determineMaximumEffectRect(DetermineMaxEffectRectFlags);
virtual FloatRect determineAbsolutePaintRect(const FloatRect& requestedAbsoluteRect);
virtual bool affectsTransparentPixels() { return false; }
@@ -179,14 +160,6 @@ private:
// This is SVG specific and needs to move to LayoutSVGResourceFilterPrimitive.
FloatRect m_filterPrimitiveSubregion;
- // x, y, width and height of the actual SVGFE*Element. Is needed to determine the subregion of the
- // filter primitive on a later step.
- FloatRect m_effectBoundaries;
- bool m_hasX;
- bool m_hasY;
- bool m_hasWidth;
- bool m_hasHeight;
-
// Should the effect clip to its primitive region, or expand to use the combined region of its inputs.
bool m_clipsToBounds;

Powered by Google App Engine
This is Rietveld 408576698