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

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

Issue 1097053004: Drop some dead code from FilterEffect (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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: Source/platform/graphics/filters/FilterEffect.cpp
diff --git a/Source/platform/graphics/filters/FilterEffect.cpp b/Source/platform/graphics/filters/FilterEffect.cpp
index 05fc52ae3b4dbe8ab6fc3de83576321742bbd752..6cd6a4c7011cf8bd2ea4f481f792f8a3476fd031 100644
--- a/Source/platform/graphics/filters/FilterEffect.cpp
+++ b/Source/platform/graphics/filters/FilterEffect.cpp
@@ -30,15 +30,13 @@
namespace blink {
FilterEffect::FilterEffect(Filter* filter)
- : m_alphaImage(false)
- , m_filter(filter)
+ : m_filter(filter)
, m_hasX(false)
, m_hasY(false)
, m_hasWidth(false)
, m_hasHeight(false)
, m_clipsToBounds(true)
, m_operatingColorSpace(ColorSpaceLinearRGB)
- , m_resultColorSpace(ColorSpaceDeviceRGB)
{
ASSERT(m_filter);
}
@@ -96,33 +94,6 @@ FloatRect FilterEffect::mapRectRecursive(const FloatRect& rect)
return mapRect(result);
}
-FloatRect FilterEffect::getSourceRect(const FloatRect& destRect, const FloatRect& destClipRect)
-{
- FloatRect sourceRect = mapRect(destRect, false);
- FloatRect sourceClipRect = mapRect(destClipRect, false);
-
- FloatRect boundaries = filter()->mapLocalRectToAbsoluteRect(effectBoundaries());
- if (hasX())
- sourceClipRect.setX(boundaries.x());
- if (hasY())
- sourceClipRect.setY(boundaries.y());
- if (hasWidth())
- sourceClipRect.setWidth(boundaries.width());
- if (hasHeight())
- sourceClipRect.setHeight(boundaries.height());
-
- FloatRect result;
- if (m_inputEffects.size() > 0) {
- result = m_inputEffects.at(0)->getSourceRect(sourceRect, sourceClipRect);
- for (unsigned i = 1; i < m_inputEffects.size(); ++i)
- result.unite(m_inputEffects.at(i)->getSourceRect(sourceRect, sourceClipRect));
- } else {
- result = sourceRect;
- result.intersect(sourceClipRect);
- }
- return result;
-}
-
FilterEffect* FilterEffect::inputEffect(unsigned number) const
{
ASSERT_WITH_SECURITY_IMPLICATION(number < m_inputEffects.size());
@@ -148,13 +119,6 @@ void FilterEffect::clearResult()
}
}
-void FilterEffect::clearResultsRecursive()
-{
- unsigned size = m_inputEffects.size();
- for (unsigned i = 0; i < size; ++i)
- m_inputEffects.at(i).get()->clearResultsRecursive();
-}
-
Color FilterEffect::adaptColorToOperatingColorSpace(const Color& deviceColor)
{
// |deviceColor| is assumed to be DeviceRGB.

Powered by Google App Engine
This is Rietveld 408576698