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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp

Issue 1841673003: Store PaintLayerFilterInfo in PaintLayerRareData instead of a HashMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp b/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp
index 653369b43c3b8d1ab157f0222e4c11026976db07..4ed74baf143f77f4c09839a31f39990e0db00f1e 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp
@@ -29,59 +29,12 @@
#include "core/paint/PaintLayerFilterInfo.h"
-#include "core/fetch/DocumentResourceReference.h"
-#include "core/layout/svg/LayoutSVGResourceContainer.h"
-#include "core/layout/svg/ReferenceFilterBuilder.h"
#include "core/paint/FilterEffectBuilder.h"
#include "core/paint/PaintLayer.h"
-#include "core/svg/SVGFilterElement.h"
+#include "platform/graphics/filters/FilterOperations.h"
namespace blink {
-PaintLayerFilterInfoMap* PaintLayerFilterInfo::s_filterMap = 0;
-
-PaintLayerFilterInfo* PaintLayerFilterInfo::filterInfoForLayer(const PaintLayer* layer)
-{
- if (!s_filterMap)
- return 0;
- PaintLayerFilterInfoMap::iterator iter = s_filterMap->find(layer);
- return (iter != s_filterMap->end()) ? iter->value : 0;
-}
-
-PaintLayerFilterInfo* PaintLayerFilterInfo::createFilterInfoForLayerIfNeeded(PaintLayer* layer)
-{
- if (!s_filterMap)
- s_filterMap = new PaintLayerFilterInfoMap();
-
- PaintLayerFilterInfoMap::iterator iter = s_filterMap->find(layer);
- if (iter != s_filterMap->end()) {
- ASSERT(layer->hasFilterInfo());
- return iter->value;
- }
-
- PaintLayerFilterInfo* filter = new PaintLayerFilterInfo(layer);
- s_filterMap->set(layer, filter);
- layer->setHasFilterInfo(true);
- return filter;
-}
-
-void PaintLayerFilterInfo::removeFilterInfoForLayer(PaintLayer* layer)
-{
- if (!s_filterMap)
- return;
- PaintLayerFilterInfo* filter = s_filterMap->take(layer);
- if (s_filterMap->isEmpty()) {
- delete s_filterMap;
- s_filterMap = 0;
- }
- if (!filter) {
- ASSERT(!layer->hasFilterInfo());
- return;
- }
- layer->setHasFilterInfo(false);
- delete filter;
-}
-
PaintLayerFilterInfo::PaintLayerFilterInfo(PaintLayer* layer)
: m_layer(layer)
{
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698