ReferenceFilterOperation doesn't need to store the FilterEffect
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Sep 2018 18:10:19 +0000 (18:10 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Sep 2018 18:10:19 +0000 (18:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189904

Reviewed by Dean Jackson.

ReferenceFilterOperation doesn't do anything with m_filterEffect so don't store it.

* platform/graphics/filters/FilterOperation.cpp:
(WebCore::ReferenceFilterOperation::setFilterEffect): Deleted.
* platform/graphics/filters/FilterOperation.h:
(WebCore::ReferenceFilterOperation::filterEffect const): Deleted.
* rendering/CSSFilter.cpp:
(WebCore::CSSFilter::build):

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

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

index ffd3f7f..143d441 100644 (file)
@@ -1,5 +1,21 @@
 2018-09-24  Simon Fraser  <simon.fraser@apple.com>
 
+        ReferenceFilterOperation doesn't need to store the FilterEffect
+        https://bugs.webkit.org/show_bug.cgi?id=189904
+
+        Reviewed by Dean Jackson.
+
+        ReferenceFilterOperation doesn't do anything with m_filterEffect so don't store it.
+
+        * platform/graphics/filters/FilterOperation.cpp:
+        (WebCore::ReferenceFilterOperation::setFilterEffect): Deleted.
+        * platform/graphics/filters/FilterOperation.h:
+        (WebCore::ReferenceFilterOperation::filterEffect const): Deleted.
+        * rendering/CSSFilter.cpp:
+        (WebCore::CSSFilter::build):
+
+2018-09-24  Simon Fraser  <simon.fraser@apple.com>
+
         Garbled rendering of image when applied feConvolveMatrix to it, on Retina display
         https://bugs.webkit.org/show_bug.cgi?id=189748
         <rdar://problem/44621494>
index 746940e..557b8e0 100644 (file)
@@ -71,11 +71,6 @@ void ReferenceFilterOperation::loadExternalDocumentIfNeeded(CachedResourceLoader
     m_cachedSVGDocumentReference->load(cachedResourceLoader, options);
 }
 
-void ReferenceFilterOperation::setFilterEffect(RefPtr<FilterEffect>&& filterEffect)
-{
-    m_filterEffect = WTFMove(filterEffect);
-}
-
 RefPtr<FilterOperation> BasicColorMatrixFilterOperation::blend(const FilterOperation* from, double progress, bool blendToPassthrough)
 {
     if (from && !from->isSameType(*this))
index 997482f..bca1a8e 100644 (file)
@@ -189,9 +189,6 @@ public:
 
     CachedSVGDocumentReference* cachedSVGDocumentReference() const { return m_cachedSVGDocumentReference.get(); }
 
-    FilterEffect* filterEffect() const { return m_filterEffect.get(); }
-    void setFilterEffect(RefPtr<FilterEffect>&&);
-
 private:
     ReferenceFilterOperation(const String& url, const String& fragment);
 
@@ -200,7 +197,6 @@ private:
     String m_url;
     String m_fragment;
     std::unique_ptr<CachedSVGDocumentReference> m_cachedSVGDocumentReference;
-    RefPtr<FilterEffect> m_filterEffect;
 };
 
 // GRAYSCALE, SEPIA, SATURATE and HUE_ROTATE are variations on a basic color matrix effect.
index e3b2e8c..985e1e5 100644 (file)
@@ -144,7 +144,6 @@ bool CSSFilter::build(RenderElement& renderer, const FilterOperations& operation
         case FilterOperation::REFERENCE: {
             auto& referenceOperation = downcast<ReferenceFilterOperation>(filterOperation);
             effect = buildReferenceFilter(renderer, *previousEffect, referenceOperation);
-            referenceOperation.setFilterEffect(effect.copyRef());
             break;
         }
         case FilterOperation::GRAYSCALE: {