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

Unified Diff: Source/platform/graphics/filters/FilterOperations.h

Issue 678163002: Oilpan: move SVG property hierarchy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 2 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
Index: Source/platform/graphics/filters/FilterOperations.h
diff --git a/Source/platform/graphics/filters/FilterOperations.h b/Source/platform/graphics/filters/FilterOperations.h
index b338709f675228ecb3e1423e382a083bae0dcecb..16df0d9d3a5327bee21c94335b5ae458393903e4 100644
--- a/Source/platform/graphics/filters/FilterOperations.h
+++ b/Source/platform/graphics/filters/FilterOperations.h
@@ -37,7 +37,11 @@ namespace blink {
typedef IntRectExtent FilterOutsets;
class PLATFORM_EXPORT FilterOperations {
+#if ENABLE(OILPAN)
+ DISALLOW_ALLOCATION();
+#else
WTF_MAKE_FAST_ALLOCATED;
+#endif
public:
FilterOperations();
FilterOperations(const FilterOperations& other) { *this = other; }
@@ -55,8 +59,10 @@ public:
m_operations.clear();
}
- Vector<RefPtr<FilterOperation> >& operations() { return m_operations; }
- const Vector<RefPtr<FilterOperation> >& operations() const { return m_operations; }
+ typedef WillBeHeapVector<RefPtrWillBeMember<FilterOperation> > FilterOperationVector;
+
+ FilterOperationVector& operations() { return m_operations; }
+ const FilterOperationVector& operations() const { return m_operations; }
bool isEmpty() const { return !m_operations.size(); }
size_t size() const { return m_operations.size(); }
@@ -71,9 +77,34 @@ public:
bool hasFilterThatMovesPixels() const;
bool hasReferenceFilter() const;
+
+ void trace(Visitor*);
+
private:
- Vector<RefPtr<FilterOperation> > m_operations;
+ FilterOperationVector m_operations;
+};
+
+#if ENABLE(OILPAN)
+// Wrapper object for the FilterOperations part object.
+class FilterOperationsWrapper : public GarbageCollected<FilterOperationsWrapper> {
haraken 2014/11/11 05:22:47 Would you help me understand why we need special w
sof 2014/11/12 13:45:08 We want to have FilterOperations be a part/value o
+public:
+ static FilterOperationsWrapper* create()
+ {
+ return new FilterOperationsWrapper();
+ }
+
+ const FilterOperations& operations() const { return m_operations; }
+
+ void trace(Visitor* visitor) { visitor->trace(m_operations); }
+
+private:
+ FilterOperationsWrapper()
+ {
+ }
+
+ FilterOperations m_operations;
};
+#endif
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698