| 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 | |
| 121 void writeRRect(const SkRRect& rrect) { | 117 void writeRRect(const SkRRect& rrect) { |
| 122 rrect.writeToMemory(this->reserve(SkRRect::kSizeInMemory)); | 118 rrect.writeToMemory(this->reserve(SkRRect::kSizeInMemory)); |
| 123 } | 119 } |
| 124 | 120 |
| 125 void writePath(const SkPath& path) { | 121 void writePath(const SkPath& path) { |
| 126 size_t size = path.writeToMemory(NULL); | 122 size_t size = path.writeToMemory(NULL); |
| 127 SkASSERT(SkAlign4(size) == size); | 123 SkASSERT(SkAlign4(size) == size); |
| 128 path.writeToMemory(this->reserve(size)); | 124 path.writeToMemory(this->reserve(size)); |
| 129 } | 125 } |
| 130 | 126 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 292 |
| 297 private: | 293 private: |
| 298 union { | 294 union { |
| 299 void* fPtrAlignment; | 295 void* fPtrAlignment; |
| 300 double fDoubleAlignment; | 296 double fDoubleAlignment; |
| 301 char fStorage[SIZE]; | 297 char fStorage[SIZE]; |
| 302 } fData; | 298 } fData; |
| 303 }; | 299 }; |
| 304 | 300 |
| 305 #endif | 301 #endif |
| OLD | NEW |