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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 virtual void readString(SkString* string); | 101 virtual void readString(SkString* string); |
102 virtual void* readEncodedString(size_t* length, SkPaint::TextEncoding encodi
ng); | 102 virtual void* readEncodedString(size_t* length, SkPaint::TextEncoding encodi
ng); |
103 | 103 |
104 // common data structures | 104 // common data structures |
105 virtual void readPoint(SkPoint* point); | 105 virtual void readPoint(SkPoint* point); |
106 SkPoint readPoint() { SkPoint p; this->readPoint(&p); return p; } | 106 SkPoint readPoint() { SkPoint p; this->readPoint(&p); return p; } |
107 virtual void readMatrix(SkMatrix* matrix); | 107 virtual void readMatrix(SkMatrix* matrix); |
108 virtual void readIRect(SkIRect* rect); | 108 virtual void readIRect(SkIRect* rect); |
109 virtual void readRect(SkRect* rect); | 109 virtual void readRect(SkRect* rect); |
110 virtual void readRegion(SkRegion* region); | 110 virtual void readRegion(SkRegion* region); |
111 virtual void readPatch(SkPatch* patch); | 111 |
112 virtual void readPath(SkPath* path); | 112 virtual void readPath(SkPath* path); |
113 void readPaint(SkPaint* paint) { paint->unflatten(*this); } | 113 void readPaint(SkPaint* paint) { paint->unflatten(*this); } |
114 | 114 |
115 virtual SkFlattenable* readFlattenable(SkFlattenable::Type); | 115 virtual SkFlattenable* readFlattenable(SkFlattenable::Type); |
116 template <typename T> T* readFlattenable() { | 116 template <typename T> T* readFlattenable() { |
117 return (T*) this->readFlattenable(T::GetFlattenableType()); | 117 return (T*) this->readFlattenable(T::GetFlattenableType()); |
118 } | 118 } |
119 SkColorFilter* readColorFilter() { return this->readFlattenable<SkColorFilte
r>(); } | 119 SkColorFilter* readColorFilter() { return this->readFlattenable<SkColorFilte
r>(); } |
120 SkDrawLooper* readDrawLooper() { return this->readFlattenable<SkDrawLooper
>(); } | 120 SkDrawLooper* readDrawLooper() { return this->readFlattenable<SkDrawLooper
>(); } |
121 SkImageFilter* readImageFilter() { return this->readFlattenable<SkImageFilte
r>(); } | 121 SkImageFilter* readImageFilter() { return this->readFlattenable<SkImageFilte
r>(); } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 SkPicture::InstallPixelRefProc fBitmapDecoder; | 225 SkPicture::InstallPixelRefProc fBitmapDecoder; |
226 | 226 |
227 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT | 227 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT |
228 // Debugging counter to keep track of how many bitmaps we | 228 // Debugging counter to keep track of how many bitmaps we |
229 // have decoded. | 229 // have decoded. |
230 int fDecodedBitmapIndex; | 230 int fDecodedBitmapIndex; |
231 #endif // DEBUG_NON_DETERMINISTIC_ASSERT | 231 #endif // DEBUG_NON_DETERMINISTIC_ASSERT |
232 }; | 232 }; |
233 | 233 |
234 #endif // SkReadBuffer_DEFINED | 234 #endif // SkReadBuffer_DEFINED |
OLD | NEW |