OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 #ifndef SkPictureRecord_DEFINED | 8 #ifndef SkPictureRecord_DEFINED |
9 #define SkPictureRecord_DEFINED | 9 #define SkPictureRecord_DEFINED |
10 | 10 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 void addInt(int value) { | 156 void addInt(int value) { |
157 fWriter.writeInt(value); | 157 fWriter.writeInt(value); |
158 } | 158 } |
159 void addScalar(SkScalar scalar) { | 159 void addScalar(SkScalar scalar) { |
160 fWriter.writeScalar(scalar); | 160 fWriter.writeScalar(scalar); |
161 } | 161 } |
162 | 162 |
163 void addBitmap(const SkBitmap& bitmap); | 163 void addBitmap(const SkBitmap& bitmap); |
164 void addMatrix(const SkMatrix& matrix); | 164 void addMatrix(const SkMatrix& matrix); |
165 void addMatrixPtr(const SkMatrix* matrix); | |
166 const SkFlatData* addPaint(const SkPaint& paint) { return this->addPaintPtr(
&paint); } | 165 const SkFlatData* addPaint(const SkPaint& paint) { return this->addPaintPtr(
&paint); } |
167 const SkFlatData* addPaintPtr(const SkPaint* paint); | 166 const SkFlatData* addPaintPtr(const SkPaint* paint); |
168 void addFlatPaint(const SkFlatData* flatPaint); | 167 void addFlatPaint(const SkFlatData* flatPaint); |
169 void addPath(const SkPath& path); | 168 void addPath(const SkPath& path); |
170 void addPicture(SkPicture& picture); | 169 void addPicture(SkPicture& picture); |
171 void addPoint(const SkPoint& point); | 170 void addPoint(const SkPoint& point); |
172 void addPoints(const SkPoint pts[], int count); | 171 void addPoints(const SkPoint pts[], int count); |
173 void addRect(const SkRect& rect); | 172 void addRect(const SkRect& rect); |
174 void addRectPtr(const SkRect* rect); | 173 void addRectPtr(const SkRect* rect); |
175 void addIRect(const SkIRect& rect); | 174 void addIRect(const SkIRect& rect); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 // subclasses, in which case they will be SkSafeUnref'd in our destructor. | 241 // subclasses, in which case they will be SkSafeUnref'd in our destructor. |
243 SkBBoxHierarchy* fBoundingHierarchy; | 242 SkBBoxHierarchy* fBoundingHierarchy; |
244 SkPictureStateTree* fStateTree; | 243 SkPictureStateTree* fStateTree; |
245 | 244 |
246 // Allocated in the constructor and managed by this class. | 245 // Allocated in the constructor and managed by this class. |
247 SkBitmapHeap* fBitmapHeap; | 246 SkBitmapHeap* fBitmapHeap; |
248 | 247 |
249 private: | 248 private: |
250 SkChunkFlatController fFlattenableHeap; | 249 SkChunkFlatController fFlattenableHeap; |
251 | 250 |
252 SkMatrixDictionary fMatrices; | |
253 SkPaintDictionary fPaints; | 251 SkPaintDictionary fPaints; |
254 SkRegionDictionary fRegions; | |
255 | 252 |
256 SkPathHeap* fPathHeap; // reference counted | 253 SkPathHeap* fPathHeap; // reference counted |
257 SkWriter32 fWriter; | 254 SkWriter32 fWriter; |
258 | 255 |
259 // we ref each item in these arrays | 256 // we ref each item in these arrays |
260 SkTDArray<SkPicture*> fPictureRefs; | 257 SkTDArray<SkPicture*> fPictureRefs; |
261 | 258 |
262 uint32_t fRecordFlags; | 259 uint32_t fRecordFlags; |
263 int fInitialSaveCount; | 260 int fInitialSaveCount; |
264 | 261 |
265 friend class SkPicturePlayback; | 262 friend class SkPicturePlayback; |
266 friend class SkPictureTester; // for unit testing | 263 friend class SkPictureTester; // for unit testing |
267 | 264 |
268 typedef SkCanvas INHERITED; | 265 typedef SkCanvas INHERITED; |
269 }; | 266 }; |
270 | 267 |
271 #endif | 268 #endif |
OLD | NEW |