OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2008 The Android Open Source Project | 3 * Copyright 2008 The Android Open Source Project |
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 | 9 |
10 #ifndef SkWriter32_DEFINED | 10 #ifndef SkWriter32_DEFINED |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 void writePoint(const SkPoint& pt) { | 109 void writePoint(const SkPoint& pt) { |
110 *(SkPoint*)this->reserve(sizeof(pt)) = pt; | 110 *(SkPoint*)this->reserve(sizeof(pt)) = pt; |
111 } | 111 } |
112 | 112 |
113 void writeRect(const SkRect& rect) { | 113 void writeRect(const SkRect& rect) { |
114 *(SkRect*)this->reserve(sizeof(rect)) = rect; | 114 *(SkRect*)this->reserve(sizeof(rect)) = rect; |
115 } | 115 } |
116 | 116 |
| 117 void writeIRect(const SkIRect& rect) { |
| 118 *(SkIRect*)this->reserve(sizeof(rect)) = rect; |
| 119 } |
| 120 |
117 void writeRRect(const SkRRect& rrect) { | 121 void writeRRect(const SkRRect& rrect) { |
118 rrect.writeToMemory(this->reserve(SkRRect::kSizeInMemory)); | 122 rrect.writeToMemory(this->reserve(SkRRect::kSizeInMemory)); |
119 } | 123 } |
120 | 124 |
121 void writePath(const SkPath& path) { | 125 void writePath(const SkPath& path) { |
122 size_t size = path.writeToMemory(NULL); | 126 size_t size = path.writeToMemory(NULL); |
123 SkASSERT(SkAlign4(size) == size); | 127 SkASSERT(SkAlign4(size) == size); |
124 path.writeToMemory(this->reserve(size)); | 128 path.writeToMemory(this->reserve(size)); |
125 } | 129 } |
126 | 130 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 296 |
293 private: | 297 private: |
294 union { | 298 union { |
295 void* fPtrAlignment; | 299 void* fPtrAlignment; |
296 double fDoubleAlignment; | 300 double fDoubleAlignment; |
297 char fStorage[SIZE]; | 301 char fStorage[SIZE]; |
298 } fData; | 302 } fData; |
299 }; | 303 }; |
300 | 304 |
301 #endif | 305 #endif |
OLD | NEW |