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 SkPictureRecord_DEFINED | 8 #ifndef SkPictureRecord_DEFINED |
9 #define SkPictureRecord_DEFINED | 9 #define SkPictureRecord_DEFINED |
10 | 10 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
149 fWriter.writeInt(PACK_8_24(drawType, *size)); | 149 fWriter.writeInt(PACK_8_24(drawType, *size)); |
150 } | 150 } |
151 | 151 |
152 return offset; | 152 return offset; |
153 } | 153 } |
154 | 154 |
155 void addInt(int value) { | 155 void addInt(int value) { |
156 fWriter.writeInt(value); | 156 fWriter.writeInt(value); |
157 } | 157 } |
158 void addScalar(SkScalar scalar) { | 158 void addScalar(SkScalar scalar) { |
159 fWriter.writeScalar(scalar); | 159 fWriter.writeT<SkScalar>(scalar); |
mtklein
2014/02/06 21:38:16
This may just be me, but when I see a call like th
f(malita)
2014/02/10 16:10:35
Will do.
| |
160 } | 160 } |
161 | 161 |
162 void addBitmap(const SkBitmap& bitmap); | 162 void addBitmap(const SkBitmap& bitmap); |
163 void addMatrix(const SkMatrix& matrix); | 163 void addMatrix(const SkMatrix& matrix); |
164 const SkFlatData* addPaint(const SkPaint& paint) { return this->addPaintPtr( &paint); } | 164 const SkFlatData* addPaint(const SkPaint& paint) { return this->addPaintPtr( &paint); } |
165 const SkFlatData* addPaintPtr(const SkPaint* paint); | 165 const SkFlatData* addPaintPtr(const SkPaint* paint); |
166 void addFlatPaint(const SkFlatData* flatPaint); | 166 void addFlatPaint(const SkFlatData* flatPaint); |
167 void addPath(const SkPath& path); | 167 void addPath(const SkPath& path); |
168 void addPicture(SkPicture& picture); | 168 void addPicture(SkPicture& picture); |
169 void addPoint(const SkPoint& point); | 169 void addPoint(const SkPoint& point); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
274 uint32_t fRecordFlags; | 274 uint32_t fRecordFlags; |
275 int fInitialSaveCount; | 275 int fInitialSaveCount; |
276 | 276 |
277 friend class SkPicturePlayback; | 277 friend class SkPicturePlayback; |
278 friend class SkPictureTester; // for unit testing | 278 friend class SkPictureTester; // for unit testing |
279 | 279 |
280 typedef SkCanvas INHERITED; | 280 typedef SkCanvas INHERITED; |
281 }; | 281 }; |
282 | 282 |
283 #endif | 283 #endif |
OLD | NEW |