diff options
author | 2012-08-12 19:25:08 +0000 | |
---|---|---|
committer | 2012-08-12 19:25:08 +0000 | |
commit | 227b516f233df5870d79d3f8dcbdaa02336b7356 (patch) | |
tree | 38379fbb6d93ca3d97fa5a64c83b6e6a93751d42 /include/core/SkFlattenable.h | |
parent | 43523f8fdac9103231f6251d72d3c460ae0e7f87 (diff) |
refactor some subclasses in SkFlattenable.h into SkPtrRecorder.h, in preparation for
privatizing SkPtrRecorder.h
git-svn-id: http://skia.googlecode.com/svn/trunk@5046 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkFlattenable.h')
-rw-r--r-- | include/core/SkFlattenable.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h index 56bc96648f..9b38032f48 100644 --- a/include/core/SkFlattenable.h +++ b/include/core/SkFlattenable.h @@ -103,52 +103,4 @@ private: 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 |