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 10 matching lines...) Expand all Loading... |
21 class SkValidatingReadBuffer : public SkReadBuffer { | 21 class SkValidatingReadBuffer : public SkReadBuffer { |
22 public: | 22 public: |
23 SkValidatingReadBuffer(const void* data, size_t size); | 23 SkValidatingReadBuffer(const void* data, size_t size); |
24 virtual ~SkValidatingReadBuffer(); | 24 virtual ~SkValidatingReadBuffer(); |
25 | 25 |
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 SkFixed readFixed() override; | |
32 int32_t readInt() override; | 31 int32_t readInt() override; |
33 SkScalar readScalar() override; | 32 SkScalar readScalar() override; |
34 uint32_t readUInt() override; | 33 uint32_t readUInt() override; |
35 int32_t read32() override; | 34 int32_t read32() override; |
36 | 35 |
37 // strings -- the caller is responsible for freeing the string contents | 36 // strings -- the caller is responsible for freeing the string contents |
38 void readString(SkString* string) override; | 37 void readString(SkString* string) override; |
39 void* readEncodedString(size_t* length, SkPaint::TextEncoding encoding) over
ride; | 38 void* readEncodedString(size_t* length, SkPaint::TextEncoding encoding) over
ride; |
40 | 39 |
41 // common data structures | 40 // common data structures |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 static bool IsPtrAlign4(const void* ptr) { | 73 static bool IsPtrAlign4(const void* ptr) { |
75 return SkIsAlign4((uintptr_t)ptr); | 74 return SkIsAlign4((uintptr_t)ptr); |
76 } | 75 } |
77 | 76 |
78 bool fError; | 77 bool fError; |
79 | 78 |
80 typedef SkReadBuffer INHERITED; | 79 typedef SkReadBuffer INHERITED; |
81 }; | 80 }; |
82 | 81 |
83 #endif // SkValidatingReadBuffer_DEFINED | 82 #endif // SkValidatingReadBuffer_DEFINED |
OLD | NEW |