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

Side by Side Diff: Source/core/rendering/svg/RenderSVGResourceFilter.h

Issue 869323003: Oilpan: move RenderObjects off heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review-induced improvements Created 5 years, 10 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 | Annotate | Revision Log
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 private: 53 private:
54 FilterData() : m_needToEndFilter(false) { } 54 FilterData() : m_needToEndFilter(false) { }
55 55
56 }; 56 };
57 57
58 class RenderSVGResourceFilter final : public RenderSVGResourceContainer { 58 class RenderSVGResourceFilter final : public RenderSVGResourceContainer {
59 public: 59 public:
60 explicit RenderSVGResourceFilter(SVGFilterElement*); 60 explicit RenderSVGResourceFilter(SVGFilterElement*);
61 61
62 virtual ~RenderSVGResourceFilter(); 62 virtual ~RenderSVGResourceFilter();
63 virtual void trace(Visitor*) override;
64 virtual void destroy() override; 63 virtual void destroy() override;
65 64
66 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const override; 65 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const override;
67 66
68 virtual const char* renderName() const override { return "RenderSVGResourceF ilter"; } 67 virtual const char* renderName() const override { return "RenderSVGResourceF ilter"; }
69 virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectSVGResourceFilter || RenderSVGResourceContainer::isOfType(type); } 68 virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectSVGResourceFilter || RenderSVGResourceContainer::isOfType(type); }
70 69
71 virtual void removeAllClientsFromCache(bool markForInvalidation = true) over ride; 70 virtual void removeAllClientsFromCache(bool markForInvalidation = true) over ride;
72 virtual void removeClientFromCache(RenderObject*, bool markForInvalidation = true) override; 71 virtual void removeClientFromCache(RenderObject*, bool markForInvalidation = true) override;
73 72
74 // Returns the context that should be used to paint the filter contents, or 73 // Returns the context that should be used to paint the filter contents, or
75 // null if there is an error. 74 // null if there is an error.
76 GraphicsContext* prepareEffect(RenderObject*, GraphicsContext*); 75 GraphicsContext* prepareEffect(RenderObject*, GraphicsContext*);
77 void finishEffect(RenderObject*, GraphicsContext*); 76 void finishEffect(RenderObject*, GraphicsContext*);
78 77
79 FloatRect resourceBoundingBox(const RenderObject*); 78 FloatRect resourceBoundingBox(const RenderObject*);
80 79
81 PassRefPtrWillBeRawPtr<SVGFilterBuilder> buildPrimitives(SVGFilter*); 80 PassRefPtrWillBeRawPtr<SVGFilterBuilder> buildPrimitives(SVGFilter*);
82 81
83 SVGUnitTypes::SVGUnitType filterUnits() const { return toSVGFilterElement(el ement())->filterUnits()->currentValue()->enumValue(); } 82 SVGUnitTypes::SVGUnitType filterUnits() const { return toSVGFilterElement(el ement())->filterUnits()->currentValue()->enumValue(); }
84 SVGUnitTypes::SVGUnitType primitiveUnits() const { return toSVGFilterElement (element())->primitiveUnits()->currentValue()->enumValue(); } 83 SVGUnitTypes::SVGUnitType primitiveUnits() const { return toSVGFilterElement (element())->primitiveUnits()->currentValue()->enumValue(); }
85 84
86 void primitiveAttributeChanged(RenderObject*, const QualifiedName&); 85 void primitiveAttributeChanged(RenderObject*, const QualifiedName&);
87 86
88 static const RenderSVGResourceType s_resourceType = FilterResourceType; 87 static const RenderSVGResourceType s_resourceType = FilterResourceType;
89 virtual RenderSVGResourceType resourceType() const override { return s_resou rceType; } 88 virtual RenderSVGResourceType resourceType() const override { return s_resou rceType; }
90 89
91 private: 90 private:
92 typedef WillBeHeapHashMap<RawPtrWillBeMember<RenderObject>, OwnPtrWillBeMemb er<FilterData> > FilterMap; 91 typedef WillBePersistentHeapHashMap<RenderObject*, OwnPtrWillBeMember<Filter Data>> FilterMap;
93 FilterMap m_filter; 92 FilterMap m_filter;
94 }; 93 };
95 94
96 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGResourceFilter, isSVGResourceFilter()); 95 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGResourceFilter, isSVGResourceFilter());
97 96
98 } 97 }
99 98
100 #endif 99 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGContainer.cpp ('k') | Source/core/rendering/svg/RenderSVGResourceFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698