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

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

Issue 1855303002: Replace filter outsets with bounds mapping in Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: senorblanco review comments Created 4 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
Index: third_party/WebKit/Source/platform/graphics/filters/FilterOperation.h
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.h b/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.h
index 7a9cdffb2a7af4d83044ff06b50dde28e8c6db71..0329e372cda26b8c651f4a2196152d4ce51eab5a 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.h
+++ b/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.h
@@ -100,6 +100,11 @@ public:
// True if the the value of one pixel can affect the value of another pixel under this operation, such as blur.
virtual bool movesPixels() const { return false; }
+ // Maps "forward" to determine which pixels in a destination rect are
+ // affected by pixels in the source rect.
+ // See also FilterEffect::mapRect.
+ virtual FloatRect mapRect(const FloatRect& rect) const { return rect; }
+
protected:
FilterOperation(OperationType type)
: m_type(type)
@@ -124,6 +129,7 @@ public:
bool affectsOpacity() const override { return true; }
bool movesPixels() const override { return true; }
+ FloatRect mapRect(const FloatRect&) const override;
const String& url() const { return m_url; }
const AtomicString& fragment() const { return m_fragment; }
@@ -252,7 +258,7 @@ public:
bool affectsOpacity() const override { return true; }
bool movesPixels() const override { return true; }
-
+ FloatRect mapRect(const FloatRect&) const override;
private:
FilterOperation* blend(const FilterOperation* from, double progress) const override;
@@ -290,7 +296,7 @@ public:
bool affectsOpacity() const override { return true; }
bool movesPixels() const override { return true; }
-
+ FloatRect mapRect(const FloatRect&) const override;
private:
FilterOperation* blend(const FilterOperation* from, double progress) const override;
@@ -329,6 +335,7 @@ public:
bool affectsOpacity() const override { return true; }
bool movesPixels() const override { return true; }
+ FloatRect mapRect(const FloatRect&) const override;
private:
FilterOperation* blend(const FilterOperation* from, double progress) const override;

Powered by Google App Engine
This is Rietveld 408576698