Index: third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.h |
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.h b/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.h |
index c9a6cc2da43fa347e7bbaea8a6e45435ff7f90d5..7fdf14d8d0452a7de4d69de82ce59a9710d79660 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.h |
+++ b/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.h |
@@ -30,11 +30,8 @@ |
#ifndef PaintLayerFilterInfo_h |
#define PaintLayerFilterInfo_h |
-#include "core/dom/Element.h" |
#include "core/svg/SVGResourceClient.h" |
-#include "platform/geometry/LayoutRect.h" |
-#include "platform/graphics/filters/FilterOperation.h" |
-#include "wtf/HashMap.h" |
+#include "platform/heap/Handle.h" |
#include "wtf/Noncopyable.h" |
#include "wtf/PassRefPtr.h" |
#include "wtf/RefPtr.h" |
@@ -44,9 +41,6 @@ namespace blink { |
class FilterEffectBuilder; |
class FilterOperations; |
class PaintLayer; |
-class PaintLayerFilterInfo; |
- |
-typedef HashMap<const PaintLayer*, PaintLayerFilterInfo*> PaintLayerFilterInfoMap; |
// PaintLayerFilterInfo holds the filter information for painting. |
// https://drafts.fxtf.org/filters/ |
@@ -57,27 +51,12 @@ typedef HashMap<const PaintLayer*, PaintLayerFilterInfo*> PaintLayerFilterInfoMa |
// painting non-hardware accelerated filters (FilterEffect). Hardware |
// accelerated CSS filters use CompositorFilterOperations, that is backed by cc. |
// |
-// PaintLayerFilterInfo is allocated when filters are present and stored in an |
-// internal map (s_filterMap) to save memory as 'filter' should be a rare |
-// property. |
class PaintLayerFilterInfo final : public SVGResourceClient { |
USING_FAST_MALLOC(PaintLayerFilterInfo); |
WTF_MAKE_NONCOPYABLE(PaintLayerFilterInfo); |
public: |
- // Queries the PaintLayerFilterInfo for the associated PaintLayer. |
- // The function returns nullptr if there is no associated |
- // |PaintLayerFilterInfo|. |
- static PaintLayerFilterInfo* filterInfoForLayer(const PaintLayer*); |
- |
- // Creates a new PaintLayerFilterInfo for the associated PaintLayer. |
- // If there is one already, it returns it instead of creating a new one. |
- // |
- // This function will never return nullptr. |
- static PaintLayerFilterInfo* createFilterInfoForLayerIfNeeded(PaintLayer*); |
- |
- // Remove the PaintLayerFilterInfo associated with PaintLayer. |
- // If there is none, this function does nothing. |
- static void removeFilterInfoForLayer(PaintLayer*); |
+ explicit PaintLayerFilterInfo(PaintLayer*); |
+ ~PaintLayerFilterInfo() override; |
FilterEffectBuilder* builder() const { return m_builder.get(); } |
void setBuilder(PassRefPtrWillBeRawPtr<FilterEffectBuilder>); |
@@ -87,14 +66,8 @@ public: |
void filterNeedsInvalidation() override; |
private: |
- PaintLayerFilterInfo(PaintLayer*); |
- ~PaintLayerFilterInfo() override; |
- |
PaintLayer* m_layer; |
- |
RefPtrWillBePersistent<FilterEffectBuilder> m_builder; |
- |
- static PaintLayerFilterInfoMap* s_filterMap; |
}; |
} // namespace blink |