OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkFlattenable_DEFINED | 8 #ifndef SkFlattenable_DEFINED |
9 #define SkFlattenable_DEFINED | 9 #define SkFlattenable_DEFINED |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 kSkPathEffect_Type, | 103 kSkPathEffect_Type, |
104 kSkPixelRef_Type, | 104 kSkPixelRef_Type, |
105 kSkRasterizer_Type, | 105 kSkRasterizer_Type, |
106 kSkShader_Type, | 106 kSkShader_Type, |
107 kSkUnused_Type, // used to be SkUnitMapper | 107 kSkUnused_Type, // used to be SkUnitMapper |
108 kSkXfermode_Type, | 108 kSkXfermode_Type, |
109 }; | 109 }; |
110 | 110 |
111 SK_DECLARE_INST_COUNT(SkFlattenable) | 111 SK_DECLARE_INST_COUNT(SkFlattenable) |
112 | 112 |
113 typedef SkFlattenable* (*Factory)(SkReadBuffer&); | 113 typedef SkFlattenable* (FactoryRef)(SkReadBuffer&); |
| 114 typedef FactoryRef* Factory; |
114 | 115 |
115 SkFlattenable() {} | 116 SkFlattenable() {} |
116 | 117 |
117 /** Implement this to return a factory function pointer that can be called | 118 /** Implement this to return a factory function pointer that can be called |
118 to recreate your class given a buffer (previously written to by your | 119 to recreate your class given a buffer (previously written to by your |
119 override of flatten(). | 120 override of flatten(). |
120 */ | 121 */ |
121 virtual Factory getFactory() const = 0; | 122 virtual Factory getFactory() const = 0; |
122 | 123 |
123 /** Returns the name of the object's class | 124 /** Returns the name of the object's class |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 156 |
156 private: | 157 private: |
157 static void InitializeFlattenablesIfNeeded(); | 158 static void InitializeFlattenablesIfNeeded(); |
158 | 159 |
159 friend class SkGraphics; | 160 friend class SkGraphics; |
160 | 161 |
161 typedef SkRefCnt INHERITED; | 162 typedef SkRefCnt INHERITED; |
162 }; | 163 }; |
163 | 164 |
164 #endif | 165 #endif |
OLD | NEW |