OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
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 SkReadBuffer_DEFINED | 8 #ifndef SkReadBuffer_DEFINED |
9 #define SkReadBuffer_DEFINED | 9 #define SkReadBuffer_DEFINED |
10 | 10 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 /** | 197 /** |
198 * Call this with a pre-loaded array of Factories, in the same order as | 198 * Call this with a pre-loaded array of Factories, in the same order as |
199 * were created/written by the writer. SkPicture uses this. | 199 * were created/written by the writer. SkPicture uses this. |
200 */ | 200 */ |
201 void setFactoryPlayback(SkFlattenable::Factory array[], int count) { | 201 void setFactoryPlayback(SkFlattenable::Factory array[], int count) { |
202 fFactoryArray = array; | 202 fFactoryArray = array; |
203 fFactoryCount = count; | 203 fFactoryCount = count; |
204 } | 204 } |
205 | 205 |
206 /** | 206 /** |
| 207 * If we are using this ReadBuffer to unflatten drawable, this function sho
uld |
| 208 * be called. It will register the default unflattening proc for SkRecorde
dDrawable. |
| 209 */ |
| 210 void initDrawableFactories(); |
| 211 |
| 212 /** |
207 * For an input flattenable (specified by name), set a custom factory proc | 213 * For an input flattenable (specified by name), set a custom factory proc |
208 * to use when unflattening. Will make a copy of |name|. | 214 * to use when unflattening. Will make a copy of |name|. |
209 * | 215 * |
210 * If the global registry already has a default factory for the flattenable
, | 216 * If the global registry already has a default factory for the flattenable
, |
211 * this will override that factory. If a custom factory has already been | 217 * this will override that factory. If a custom factory has already been |
212 * set for the flattenable, this will override that factory. | 218 * set for the flattenable, this will override that factory. |
213 * | 219 * |
214 * Custom factories can be removed by calling setCustomFactory("...", nullp
tr). | 220 * Custom factories can be removed by calling setCustomFactory("...", nullp
tr). |
215 */ | 221 */ |
216 void setCustomFactory(const SkString& name, SkFlattenable::Factory factory)
{ | 222 void setCustomFactory(const SkString& name, SkFlattenable::Factory factory)
{ |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 SkPicture::InstallPixelRefProc fBitmapDecoder; | 283 SkPicture::InstallPixelRefProc fBitmapDecoder; |
278 | 284 |
279 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT | 285 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT |
280 // Debugging counter to keep track of how many bitmaps we | 286 // Debugging counter to keep track of how many bitmaps we |
281 // have decoded. | 287 // have decoded. |
282 int fDecodedBitmapIndex; | 288 int fDecodedBitmapIndex; |
283 #endif // DEBUG_NON_DETERMINISTIC_ASSERT | 289 #endif // DEBUG_NON_DETERMINISTIC_ASSERT |
284 }; | 290 }; |
285 | 291 |
286 #endif // SkReadBuffer_DEFINED | 292 #endif // SkReadBuffer_DEFINED |
OLD | NEW |