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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 bool isCrossProcess() const { | 63 bool isCrossProcess() const { |
64 return this->isValidating() || SkToBool(fFlags & kCrossProcess_Flag); | 64 return this->isValidating() || SkToBool(fFlags & kCrossProcess_Flag); |
65 } | 65 } |
66 bool isScalarFloat() const { return SkToBool(fFlags & kScalarIsFloat_Flag);
} | 66 bool isScalarFloat() const { return SkToBool(fFlags & kScalarIsFloat_Flag);
} |
67 bool isPtr64Bit() const { return SkToBool(fFlags & kPtrIs64Bit_Flag); } | 67 bool isPtr64Bit() const { return SkToBool(fFlags & kPtrIs64Bit_Flag); } |
68 bool isValidating() const { return SkToBool(fFlags & kValidation_Flag); } | 68 bool isValidating() const { return SkToBool(fFlags & kValidation_Flag); } |
69 | 69 |
70 SkReader32* getReader32() { return &fReader; } | 70 SkReader32* getReader32() { return &fReader; } |
71 | 71 |
72 uint32_t size() { return fReader.size(); } | 72 size_t size() { return fReader.size(); } |
73 uint32_t offset() { return fReader.offset(); } | 73 size_t offset() { return fReader.offset(); } |
74 bool eof() { return fReader.eof(); } | 74 bool eof() { return fReader.eof(); } |
75 const void* skip(size_t size) { return fReader.skip(size); } | 75 const void* skip(size_t size) { return fReader.skip(size); } |
76 void* readFunctionPtr() { return fReader.readPtr(); } | 76 void* readFunctionPtr() { return fReader.readPtr(); } |
77 | 77 |
78 // primitives | 78 // primitives |
79 virtual bool readBool(); | 79 virtual bool readBool(); |
80 virtual SkColor readColor(); | 80 virtual SkColor readColor(); |
81 virtual SkFixed readFixed(); | 81 virtual SkFixed readFixed(); |
82 virtual int32_t readInt(); | 82 virtual int32_t readInt(); |
83 virtual SkScalar readScalar(); | 83 virtual SkScalar readScalar(); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 SkPicture::InstallPixelRefProc fBitmapDecoder; | 203 SkPicture::InstallPixelRefProc fBitmapDecoder; |
204 | 204 |
205 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT | 205 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT |
206 // Debugging counter to keep track of how many bitmaps we | 206 // Debugging counter to keep track of how many bitmaps we |
207 // have decoded. | 207 // have decoded. |
208 int fDecodedBitmapIndex; | 208 int fDecodedBitmapIndex; |
209 #endif // DEBUG_NON_DETERMINISTIC_ASSERT | 209 #endif // DEBUG_NON_DETERMINISTIC_ASSERT |
210 }; | 210 }; |
211 | 211 |
212 #endif // SkReadBuffer_DEFINED | 212 #endif // SkReadBuffer_DEFINED |
OLD | NEW |