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 |