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

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

Issue 2329803002: Drop FilterEffect::m_absolutePaintRect (Closed)
Patch Set: Add comment 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.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp b/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp
index ca28865cf218340e852d52d760653ea66891362a..1b5f60c7b2725cb7b309c48a587378a669e0b253 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp
+++ b/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp
@@ -56,18 +56,13 @@ FloatRect FilterEffect::absoluteBounds() const
return getFilter()->mapLocalRectToAbsoluteRect(computedBounds);
}
-FloatRect FilterEffect::determineAbsolutePaintRect(const FloatRect& originalRequestedRect)
+FloatRect FilterEffect::determineAbsolutePaintRect(const FloatRect& originalRequestedRect) const
{
FloatRect requestedRect = originalRequestedRect;
// Filters in SVG clip to primitive subregion, while CSS doesn't.
if (clipsToBounds())
requestedRect.intersect(absoluteBounds());
- // We may be called multiple times if result is used more than once. Return
- // quickly if if nothing new is required.
- if (absolutePaintRect().contains(enclosingIntRect(requestedRect)))
- return requestedRect;
-
FloatRect inputRect = mapPaintRect(requestedRect, false);
FloatRect inputUnion;
unsigned size = m_inputEffects.size();
@@ -82,8 +77,6 @@ FloatRect FilterEffect::determineAbsolutePaintRect(const FloatRect& originalRequ
// Rect may have inflated. Re-intersect with request.
inputUnion.intersect(requestedRect);
}
-
- addAbsolutePaintRect(inputUnion);
return inputUnion;
}
@@ -105,21 +98,10 @@ FilterEffect* FilterEffect::inputEffect(unsigned number) const
return m_inputEffects.at(number).get();
}
-void FilterEffect::addAbsolutePaintRect(const FloatRect& paintRect)
-{
- IntRect intPaintRect(enclosingIntRect(paintRect));
- if (m_absolutePaintRect.contains(intPaintRect))
- return;
- intPaintRect.unite(m_absolutePaintRect);
- m_absolutePaintRect = intPaintRect;
-}
-
void FilterEffect::clearResult()
{
- m_absolutePaintRect = IntRect();
- for (int i = 0; i < 4; i++) {
+ for (int i = 0; i < 4; i++)
m_imageFilters[i] = nullptr;
- }
}
Color FilterEffect::adaptColorToOperatingColorSpace(const Color& deviceColor)

Powered by Google App Engine
This is Rietveld 408576698