typedef SkRefCnt INHERITED;
};
-///////////////////////////////////////////////////////////////////////////////
-
-#include "SkPtrRecorder.h"
-
-/**
- * Subclass of SkTPtrSet specialed to call ref() and unref() when the
- * base class's incPtr() and decPtr() are called. This makes it a valid owner
- * of each ptr, which is released when the set is reset or destroyed.
- */
-class SkRefCntSet : public SkTPtrSet<SkRefCnt*> {
-public:
- virtual ~SkRefCntSet();
-
-protected:
- // overrides
- virtual void incPtr(void*);
- virtual void decPtr(void*);
-};
-
-class SkFactorySet : public SkTPtrSet<SkFlattenable::Factory> {};
-
-/**
- * Similar to SkFactorySet, but only allows Factorys that have registered names.
- * Also has a function to return the next added Factory's name.
- */
-class SkNamedFactorySet : public SkRefCnt {
-public:
- SkNamedFactorySet();
-
- /**
- * Find the specified Factory in the set. If it is not already in the set,
- * and has registered its name, add it to the set, and return its index.
- * If the Factory has no registered name, return 0.
- */
- uint32_t find(SkFlattenable::Factory);
-
- /**
- * If new Factorys have been added to the set, return the name of the first
- * Factory added after the Factory name returned by the last call to this
- * function.
- */
- const char* getNextAddedFactoryName();
-private:
- int fNextAddedFactory;
- SkFactorySet fFactorySet;
- SkTDArray<const char*> fNames;
-};
-
#endif
#define SkPtrSet_DEFINED
#include "SkRefCnt.h"
+#include "SkFlattenable.h"
#include "SkTDArray.h"
/**
typedef SkPtrSet INHERITED;
};
+/**
+ * Subclass of SkTPtrSet specialed to call ref() and unref() when the
+ * base class's incPtr() and decPtr() are called. This makes it a valid owner
+ * of each ptr, which is released when the set is reset or destroyed.
+ */
+class SkRefCntSet : public SkTPtrSet<SkRefCnt*> {
+public:
+ virtual ~SkRefCntSet();
+
+protected:
+ // overrides
+ virtual void incPtr(void*);
+ virtual void decPtr(void*);
+};
+
+class SkFactorySet : public SkTPtrSet<SkFlattenable::Factory> {};
+
+/**
+ * Similar to SkFactorySet, but only allows Factorys that have registered names.
+ * Also has a function to return the next added Factory's name.
+ */
+class SkNamedFactorySet : public SkRefCnt {
+public:
+ SkNamedFactorySet();
+
+ /**
+ * Find the specified Factory in the set. If it is not already in the set,
+ * and has registered its name, add it to the set, and return its index.
+ * If the Factory has no registered name, return 0.
+ */
+ uint32_t find(SkFlattenable::Factory);
+
+ /**
+ * If new Factorys have been added to the set, return the name of the first
+ * Factory added after the Factory name returned by the last call to this
+ * function.
+ */
+ const char* getNextAddedFactoryName();
+private:
+ int fNextAddedFactory;
+ SkFactorySet fFactorySet;
+ SkTDArray<const char*> fNames;
+};
+
#endif
* found in the LICENSE file.
*/
#include "SkFlattenable.h"
+#include "SkPtrRecorder.h"
SK_DEFINE_INST_COUNT(SkFlattenable)
#include "SkGlyph.h"
#include "SkScalerContext.h"
#include "SkTemplates.h"
+#include "SkTDArray.h"
class SkPaint;
*/
#include "SkOrderedWriteBuffer.h"
+#include "SkPtrRecorder.h"
#include "SkTypeface.h"
SkOrderedWriteBuffer::SkOrderedWriteBuffer(size_t minSize)
#include "SkWriter32.h"
class SkFlattenable;
+class SkFactorySet;
+class SkNamedFactorySet;
+class SkRefCntSet;
class SkOrderedWriteBuffer : public SkFlattenableWriteBuffer {
public:
#include "SkOrderedReadBuffer.h"
#include "SkOrderedWriteBuffer.h"
#include "SkPicture.h"
+#include "SkPtrRecorder.h"
#include "SkMatrix.h"
#include "SkPaint.h"
#include "SkPath.h"