Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: src/core/SkPictureRecord.h

Issue 143883006: No deduping dictionaries for matrices and regions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bump picture version Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698