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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 void setTypefaceArray(SkTypeface* array[], int count) { | 178 void setTypefaceArray(SkTypeface* array[], int count) { |
179 fTFArray = array; | 179 fTFArray = array; |
180 fTFCount = count; | 180 fTFCount = count; |
181 } | 181 } |
182 | 182 |
183 /** | 183 /** |
184 * Call this with a pre-loaded array of Factories, in the same order as | 184 * Call this with a pre-loaded array of Factories, in the same order as |
185 * were created/written by the writer. SkPicture uses this. | 185 * were created/written by the writer. SkPicture uses this. |
186 */ | 186 */ |
187 void setFactoryPlayback(SkFlattenable::Factory array[], int count) { | 187 void setFactoryPlayback(SkFlattenable::Factory array[], int count) { |
188 fFactoryTDArray = NULL; | 188 fFactoryTDArray = nullptr; |
189 fFactoryArray = array; | 189 fFactoryArray = array; |
190 fFactoryCount = count; | 190 fFactoryCount = count; |
191 } | 191 } |
192 | 192 |
193 /** | 193 /** |
194 * Call this with an initially empty array, so the reader can cache each | 194 * Call this with an initially empty array, so the reader can cache each |
195 * factory it sees by name. Used by the pipe code in conjunction with | 195 * factory it sees by name. Used by the pipe code in conjunction with |
196 * SkWriteBuffer::setNamedFactoryRecorder. | 196 * SkWriteBuffer::setNamedFactoryRecorder. |
197 */ | 197 */ |
198 void setFactoryArray(SkTDArray<SkFlattenable::Factory>* array) { | 198 void setFactoryArray(SkTDArray<SkFlattenable::Factory>* array) { |
199 fFactoryTDArray = array; | 199 fFactoryTDArray = array; |
200 fFactoryArray = NULL; | 200 fFactoryArray = nullptr; |
201 fFactoryCount = 0; | 201 fFactoryCount = 0; |
202 } | 202 } |
203 | 203 |
204 /** | 204 /** |
205 * Provide a function to decode an SkBitmap from encoded data. Only used if
the writer | 205 * Provide a function to decode an SkBitmap from encoded data. Only used if
the writer |
206 * encoded the SkBitmap. If the proper decoder cannot be used, a red bitmap
with the | 206 * encoded the SkBitmap. If the proper decoder cannot be used, a red bitmap
with the |
207 * appropriate size will be used. | 207 * appropriate size will be used. |
208 */ | 208 */ |
209 void setBitmapDecoder(SkPicture::InstallPixelRefProc bitmapDecoder) { | 209 void setBitmapDecoder(SkPicture::InstallPixelRefProc bitmapDecoder) { |
210 fBitmapDecoder = bitmapDecoder; | 210 fBitmapDecoder = bitmapDecoder; |
(...skipping 26 matching lines...) Expand all Loading... |
237 SkPicture::InstallPixelRefProc fBitmapDecoder; | 237 SkPicture::InstallPixelRefProc fBitmapDecoder; |
238 | 238 |
239 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT | 239 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT |
240 // Debugging counter to keep track of how many bitmaps we | 240 // Debugging counter to keep track of how many bitmaps we |
241 // have decoded. | 241 // have decoded. |
242 int fDecodedBitmapIndex; | 242 int fDecodedBitmapIndex; |
243 #endif // DEBUG_NON_DETERMINISTIC_ASSERT | 243 #endif // DEBUG_NON_DETERMINISTIC_ASSERT |
244 }; | 244 }; |
245 | 245 |
246 #endif // SkReadBuffer_DEFINED | 246 #endif // SkReadBuffer_DEFINED |
OLD | NEW |