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

Side by Side Diff: Source/core/layout/svg/LayoutSVGResourceFilter.h

Issue 1010673005: Oilpan: promptly release FilterData on LayoutSVGResourceFilter destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/layout/svg/LayoutSVGResourceFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 ReadyToPaint, 49 ReadyToPaint,
50 PaintingFilter, 50 PaintingFilter,
51 PaintingFilterCycleDetected 51 PaintingFilterCycleDetected
52 }; 52 };
53 53
54 static PassOwnPtrWillBeRawPtr<FilterData> create() 54 static PassOwnPtrWillBeRawPtr<FilterData> create()
55 { 55 {
56 return adoptPtrWillBeNoop(new FilterData()); 56 return adoptPtrWillBeNoop(new FilterData());
57 } 57 }
58 58
59 void dispose();
60
59 DECLARE_TRACE(); 61 DECLARE_TRACE();
60 62
61 RefPtrWillBeMember<SVGFilter> filter; 63 RefPtrWillBeMember<SVGFilter> filter;
62 RefPtrWillBeMember<SVGFilterBuilder> builder; 64 RefPtrWillBeMember<SVGFilterBuilder> builder;
63 OwnPtr<DisplayItemList> m_displayItemList; 65 OwnPtr<DisplayItemList> m_displayItemList;
64 OwnPtr<GraphicsContext> m_context; 66 OwnPtr<GraphicsContext> m_context;
65 FloatRect boundaries; 67 FloatRect boundaries;
66 FilterDataState m_state; 68 FilterDataState m_state;
67 69
68 private: 70 private:
(...skipping 24 matching lines...) Expand all
93 95
94 void primitiveAttributeChanged(LayoutObject*, const QualifiedName&); 96 void primitiveAttributeChanged(LayoutObject*, const QualifiedName&);
95 97
96 static const LayoutSVGResourceType s_resourceType = FilterResourceType; 98 static const LayoutSVGResourceType s_resourceType = FilterResourceType;
97 virtual LayoutSVGResourceType resourceType() const override { return s_resou rceType; } 99 virtual LayoutSVGResourceType resourceType() const override { return s_resou rceType; }
98 100
99 FilterData* getFilterDataForLayoutObject(LayoutObject* object) { return m_fi lter.get(object); } 101 FilterData* getFilterDataForLayoutObject(LayoutObject* object) { return m_fi lter.get(object); }
100 void setFilterDataForLayoutObject(LayoutObject* object, PassOwnPtrWillBeRawP tr<FilterData> filterData) { m_filter.set(object, filterData); } 102 void setFilterDataForLayoutObject(LayoutObject* object, PassOwnPtrWillBeRawP tr<FilterData> filterData) { m_filter.set(object, filterData); }
101 103
102 private: 104 private:
103 typedef WillBePersistentHeapHashMap<LayoutObject*, OwnPtrWillBeMember<Filter Data>> FilterMap; 105 void disposeFilterMap();
106
107 using FilterMap = WillBePersistentHeapHashMap<LayoutObject*, OwnPtrWillBeMem ber<FilterData>>;
104 FilterMap m_filter; 108 FilterMap m_filter;
105 }; 109 };
106 110
107 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGResourceFilter, isSVGResourceFilter()); 111 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGResourceFilter, isSVGResourceFilter());
108 112
109 } 113 }
110 114
111 #endif 115 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/layout/svg/LayoutSVGResourceFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698