OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 SkFlattenableBuffers_DEFINED | 9 #ifndef SkFlattenableBuffers_DEFINED |
10 #define SkFlattenableBuffers_DEFINED | 10 #define SkFlattenableBuffers_DEFINED |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // primitives | 53 // primitives |
54 virtual bool readBool() = 0; | 54 virtual bool readBool() = 0; |
55 virtual SkColor readColor() = 0; | 55 virtual SkColor readColor() = 0; |
56 virtual SkFixed readFixed() = 0; | 56 virtual SkFixed readFixed() = 0; |
57 virtual int32_t readInt() = 0; | 57 virtual int32_t readInt() = 0; |
58 virtual SkScalar readScalar() = 0; | 58 virtual SkScalar readScalar() = 0; |
59 virtual uint32_t readUInt() = 0; | 59 virtual uint32_t readUInt() = 0; |
60 virtual int32_t read32() = 0; | 60 virtual int32_t read32() = 0; |
61 | 61 |
62 // strings -- the caller is responsible for freeing the string contents | 62 // strings -- the caller is responsible for freeing the string contents |
63 virtual char* readString() = 0; | 63 virtual void readString(SkString* string) = 0; |
64 virtual void* readEncodedString(size_t* length, SkPaint::TextEncoding encodi
ng) = 0; | 64 virtual void* readEncodedString(size_t* length, SkPaint::TextEncoding encodi
ng) = 0; |
65 | 65 |
66 // common data structures | 66 // common data structures |
67 virtual SkFlattenable* readFlattenable() = 0; | 67 virtual SkFlattenable* readFlattenable() = 0; |
68 virtual void readPoint(SkPoint* point) = 0; | 68 virtual void readPoint(SkPoint* point) = 0; |
69 virtual void readMatrix(SkMatrix* matrix) = 0; | 69 virtual void readMatrix(SkMatrix* matrix) = 0; |
70 virtual void readIRect(SkIRect* rect) = 0; | 70 virtual void readIRect(SkIRect* rect) = 0; |
71 virtual void readRect(SkRect* rect) = 0; | 71 virtual void readRect(SkRect* rect) = 0; |
72 virtual void readRegion(SkRegion* region) = 0; | 72 virtual void readRegion(SkRegion* region) = 0; |
73 virtual void readPath(SkPath* path) = 0; | 73 virtual void readPath(SkPath* path) = 0; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 bool persistTypeface() const { return (fFlags & kCrossProcess_Flag) != 0; } | 166 bool persistTypeface() const { return (fFlags & kCrossProcess_Flag) != 0; } |
167 | 167 |
168 protected: | 168 protected: |
169 // A helper function so that each subclass does not have to be a friend of S
kFlattenable | 169 // A helper function so that each subclass does not have to be a friend of S
kFlattenable |
170 void flattenObject(SkFlattenable* obj, SkFlattenableWriteBuffer& buffer); | 170 void flattenObject(SkFlattenable* obj, SkFlattenableWriteBuffer& buffer); |
171 | 171 |
172 uint32_t fFlags; | 172 uint32_t fFlags; |
173 }; | 173 }; |
174 | 174 |
175 #endif | 175 #endif |
OLD | NEW |