| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifndef SkReadBuffer_DEFINED | 9 #ifndef SkReadBuffer_DEFINED |
| 10 #define SkReadBuffer_DEFINED | 10 #define SkReadBuffer_DEFINED |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 SkReadBuffer(); | 39 SkReadBuffer(); |
| 40 SkReadBuffer(const void* data, size_t size); | 40 SkReadBuffer(const void* data, size_t size); |
| 41 SkReadBuffer(SkStream* stream); | 41 SkReadBuffer(SkStream* stream); |
| 42 virtual ~SkReadBuffer(); | 42 virtual ~SkReadBuffer(); |
| 43 | 43 |
| 44 /** Return the version of the serialized picture this buffer holds, or 0 if
unset. */ | 44 /** Return the version of the serialized picture this buffer holds, or 0 if
unset. */ |
| 45 int pictureVersion() const { return fPictureVersion; } | 45 int pictureVersion() const { return fPictureVersion; } |
| 46 | 46 |
| 47 /** This may be called at most once; most clients of SkReadBuffer should not
mess with it. */ | 47 /** This may be called at most once; most clients of SkReadBuffer should not
mess with it. */ |
| 48 void setPictureVersion(int version) { | 48 void setPictureVersion(int version) { |
| 49 SkASSERT(0 == fPictureVersion); | 49 SkASSERT(0 == fPictureVersion || version == fPictureVersion); |
| 50 fPictureVersion = version; | 50 fPictureVersion = version; |
| 51 } | 51 } |
| 52 | 52 |
| 53 enum Flags { | 53 enum Flags { |
| 54 kCrossProcess_Flag = 1 << 0, | 54 kCrossProcess_Flag = 1 << 0, |
| 55 kScalarIsFloat_Flag = 1 << 1, | 55 kScalarIsFloat_Flag = 1 << 1, |
| 56 kPtrIs64Bit_Flag = 1 << 2, | 56 kPtrIs64Bit_Flag = 1 << 2, |
| 57 kValidation_Flag = 1 << 3, | 57 kValidation_Flag = 1 << 3, |
| 58 }; | 58 }; |
| 59 | 59 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 SkPicture::InstallPixelRefProc fBitmapDecoder; | 208 SkPicture::InstallPixelRefProc fBitmapDecoder; |
| 209 | 209 |
| 210 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT | 210 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT |
| 211 // Debugging counter to keep track of how many bitmaps we | 211 // Debugging counter to keep track of how many bitmaps we |
| 212 // have decoded. | 212 // have decoded. |
| 213 int fDecodedBitmapIndex; | 213 int fDecodedBitmapIndex; |
| 214 #endif // DEBUG_NON_DETERMINISTIC_ASSERT | 214 #endif // DEBUG_NON_DETERMINISTIC_ASSERT |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 #endif // SkReadBuffer_DEFINED | 217 #endif // SkReadBuffer_DEFINED |
| OLD | NEW |