Index: src/core/SkPtrRecorder.h |
diff --git a/src/core/SkPtrRecorder.h b/src/core/SkPtrRecorder.h |
index 06e14ab6ec03de555e41a57274deec4424906afd..83200f527536142324a51e159a76eaed0045036d 100644 |
--- a/src/core/SkPtrRecorder.h |
+++ b/src/core/SkPtrRecorder.h |
@@ -58,6 +58,27 @@ public: |
*/ |
void reset(); |
+ /** |
+ * Set iterator. |
+ */ |
+ class Iter { |
+ public: |
+ Iter(const SkPtrSet& set) |
+ : fSet(set) |
+ , fIndex(0) {} |
+ |
+ /** |
+ * Return the next ptr in the set or null if the end was reached. |
+ */ |
+ void* next() { |
+ return fIndex < fSet.fList.count() ? fSet.fList[fIndex++].fPtr : NULL; |
+ } |
+ |
+ private: |
+ const SkPtrSet& fSet; |
+ int fIndex; |
+ }; |
+ |
protected: |
virtual void incPtr(void*) {} |
virtual void decPtr(void*) {} |