GammaFilterOperation seems to be dead code
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Oct 2013 21:40:41 +0000 (21:40 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Oct 2013 21:40:41 +0000 (21:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=123173

Reviewed by Simon Fraser.

* platform/graphics/filters/FilterOperation.cpp:
* platform/graphics/filters/FilterOperation.h:
Remove dead code.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157816 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/filters/FilterOperation.cpp
Source/WebCore/platform/graphics/filters/FilterOperation.h

index 4695033..d425d6a 100644 (file)
@@ -1,3 +1,14 @@
+2013-10-22  Tim Horton  <timothy_horton@apple.com>
+
+        GammaFilterOperation seems to be dead code
+        https://bugs.webkit.org/show_bug.cgi?id=123173
+
+        Reviewed by Simon Fraser.
+
+        * platform/graphics/filters/FilterOperation.cpp:
+        * platform/graphics/filters/FilterOperation.h:
+        Remove dead code.
+
 2013-10-22  Antti Koivisto  <antti@apple.com>
 
         Rename some line box functions to be just about lines
index 8bc7914..1253d2b 100644 (file)
@@ -112,27 +112,6 @@ double BasicComponentTransferFilterOperation::passthroughAmount() const
     }
 }
 
-PassRefPtr<FilterOperation> GammaFilterOperation::blend(const FilterOperation* from, double progress, bool blendToPassthrough)
-{
-    if (from && !from->isSameType(*this))
-        return this;
-    
-    if (blendToPassthrough)
-        return GammaFilterOperation::create(
-            WebCore::blend(m_amplitude, 1.0, progress),
-            WebCore::blend(m_exponent, 1.0, progress),
-            WebCore::blend(m_offset, 0.0, progress), m_type);
-        
-    const GammaFilterOperation* fromOp = static_cast<const GammaFilterOperation*>(from);
-    double fromAmplitude = fromOp ? fromOp->amplitude() : 1;
-    double fromExponent = fromOp ? fromOp->exponent() : 1;
-    double fromOffset = fromOp ? fromOp->offset() : 0;
-    return GammaFilterOperation::create(
-        WebCore::blend(fromAmplitude, m_amplitude, progress),
-        WebCore::blend(fromExponent, m_exponent, progress),
-        WebCore::blend(fromOffset, m_offset, progress), m_type);
-}
-
 PassRefPtr<FilterOperation> BlurFilterOperation::blend(const FilterOperation* from, double progress, bool blendToPassthrough)
 {
     if (from && !from->isSameType(*this))
index 11265d0..19afb55 100644 (file)
@@ -266,41 +266,6 @@ private:
     double m_amount;
 };
 
-class GammaFilterOperation : public FilterOperation {
-public:
-    static PassRefPtr<GammaFilterOperation> create(double amplitude, double exponent, double offset, OperationType type)
-    {
-        return adoptRef(new GammaFilterOperation(amplitude, exponent, offset, type));
-    }
-
-    double amplitude() const { return m_amplitude; }
-    double exponent() const { return m_exponent; }
-    double offset() const { return m_offset; }
-
-    virtual PassRefPtr<FilterOperation> blend(const FilterOperation* from, double progress, bool blendToPassthrough = false) OVERRIDE;
-
-private:
-    virtual bool operator==(const FilterOperation& o) const OVERRIDE
-    {
-        if (!isSameType(o))
-            return false;
-        const GammaFilterOperation* other = static_cast<const GammaFilterOperation*>(&o);
-        return m_amplitude == other->m_amplitude && m_exponent == other->m_exponent && m_offset == other->m_offset;
-    }
-
-    GammaFilterOperation(double amplitude, double exponent, double offset, OperationType type)
-        : FilterOperation(type)
-        , m_amplitude(amplitude)
-        , m_exponent(exponent)
-        , m_offset(offset)
-    {
-    }
-
-    double m_amplitude;
-    double m_exponent;
-    double m_offset;
-};
-
 class BlurFilterOperation : public FilterOperation {
 public:
     static PassRefPtr<BlurFilterOperation> create(Length stdDeviation, OperationType type)