| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 SkValidatingReadBuffer_DEFINED | 8 #ifndef SkValidatingReadBuffer_DEFINED |
| 9 #define SkValidatingReadBuffer_DEFINED | 9 #define SkValidatingReadBuffer_DEFINED |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 const void* skip(size_t size) override; | 26 const void* skip(size_t size) override; |
| 27 | 27 |
| 28 // primitives | 28 // primitives |
| 29 bool readBool() override; | 29 bool readBool() override; |
| 30 SkColor readColor() override; | 30 SkColor readColor() override; |
| 31 int32_t readInt() override; | 31 int32_t readInt() override; |
| 32 SkScalar readScalar() override; | 32 SkScalar readScalar() override; |
| 33 uint32_t readUInt() override; | 33 uint32_t readUInt() override; |
| 34 int32_t read32() override; | 34 int32_t read32() override; |
| 35 | 35 |
| 36 // peek |
| 37 uint8_t peekByte() override; |
| 38 |
| 36 // strings -- the caller is responsible for freeing the string contents | 39 // strings -- the caller is responsible for freeing the string contents |
| 37 void readString(SkString* string) override; | 40 void readString(SkString* string) override; |
| 38 void* readEncodedString(size_t* length, SkPaint::TextEncoding encoding) over
ride; | 41 void* readEncodedString(size_t* length, SkPaint::TextEncoding encoding) over
ride; |
| 39 | 42 |
| 40 // common data structures | 43 // common data structures |
| 41 SkFlattenable* readFlattenable(SkFlattenable::Type type) override; | 44 SkFlattenable* readFlattenable(SkFlattenable::Type type) override; |
| 42 void skipFlattenable() override; | 45 void skipFlattenable() override; |
| 43 void readPoint(SkPoint* point) override; | 46 void readPoint(SkPoint* point) override; |
| 44 void readMatrix(SkMatrix* matrix) override; | 47 void readMatrix(SkMatrix* matrix) override; |
| 45 void readIRect(SkIRect* rect) override; | 48 void readIRect(SkIRect* rect) override; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 73 static bool IsPtrAlign4(const void* ptr) { | 76 static bool IsPtrAlign4(const void* ptr) { |
| 74 return SkIsAlign4((uintptr_t)ptr); | 77 return SkIsAlign4((uintptr_t)ptr); |
| 75 } | 78 } |
| 76 | 79 |
| 77 bool fError; | 80 bool fError; |
| 78 | 81 |
| 79 typedef SkReadBuffer INHERITED; | 82 typedef SkReadBuffer INHERITED; |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 #endif // SkValidatingReadBuffer_DEFINED | 85 #endif // SkValidatingReadBuffer_DEFINED |
| OLD | NEW |