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 21 matching lines...) Expand all Loading... |
32 #define DEBUG_NON_DETERMINISTIC_ASSERT | 32 #define DEBUG_NON_DETERMINISTIC_ASSERT |
33 #endif | 33 #endif |
34 | 34 |
35 class SkReadBuffer { | 35 class SkReadBuffer { |
36 public: | 36 public: |
37 SkReadBuffer(); | 37 SkReadBuffer(); |
38 SkReadBuffer(const void* data, size_t size); | 38 SkReadBuffer(const void* data, size_t size); |
39 SkReadBuffer(SkStream* stream); | 39 SkReadBuffer(SkStream* stream); |
40 virtual ~SkReadBuffer(); | 40 virtual ~SkReadBuffer(); |
41 | 41 |
| 42 virtual SkReadBuffer* clone(const void* data, size_t size) const { |
| 43 return new SkReadBuffer(data, size); |
| 44 } |
| 45 |
42 enum Version { | 46 enum Version { |
43 /* | 47 /* |
44 kFilterLevelIsEnum_Version = 23, | 48 kFilterLevelIsEnum_Version = 23, |
45 kGradientFlippedFlag_Version = 24, | 49 kGradientFlippedFlag_Version = 24, |
46 kDashWritesPhaseIntervals_Version = 25, | 50 kDashWritesPhaseIntervals_Version = 25, |
47 kColorShaderNoBool_Version = 26, | 51 kColorShaderNoBool_Version = 26, |
48 kNoUnitMappers_Version = 27, | 52 kNoUnitMappers_Version = 27, |
49 kNoMoreBitmapFlatten_Version = 28, | 53 kNoMoreBitmapFlatten_Version = 28, |
50 kSimplifyLocalMatrix_Version = 30, | 54 kSimplifyLocalMatrix_Version = 30, |
51 kImageFilterUniqueID_Version = 31, | 55 kImageFilterUniqueID_Version = 31, |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 SkPicture::InstallPixelRefProc fBitmapDecoder; | 237 SkPicture::InstallPixelRefProc fBitmapDecoder; |
234 | 238 |
235 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT | 239 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT |
236 // Debugging counter to keep track of how many bitmaps we | 240 // Debugging counter to keep track of how many bitmaps we |
237 // have decoded. | 241 // have decoded. |
238 int fDecodedBitmapIndex; | 242 int fDecodedBitmapIndex; |
239 #endif // DEBUG_NON_DETERMINISTIC_ASSERT | 243 #endif // DEBUG_NON_DETERMINISTIC_ASSERT |
240 }; | 244 }; |
241 | 245 |
242 #endif // SkReadBuffer_DEFINED | 246 #endif // SkReadBuffer_DEFINED |
OLD | NEW |