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

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

Issue 715423003: Restore bitmap dedup in SkPictureRecord. Cuts RAM usage of DM by half. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 6 years, 1 month 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 | « no previous file | src/core/SkPictureRecord.cpp » ('j') | src/core/SkPictureRecord.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return offset; 144 return offset;
145 } 145 }
146 146
147 void addInt(int value) { 147 void addInt(int value) {
148 fWriter.writeInt(value); 148 fWriter.writeInt(value);
149 } 149 }
150 void addScalar(SkScalar scalar) { 150 void addScalar(SkScalar scalar) {
151 fWriter.writeScalar(scalar); 151 fWriter.writeScalar(scalar);
152 } 152 }
153 153
154 // The command at 'offset' in the skp uses the specified bitmap 154 void addBitmap(const SkBitmap& bitmap);
155 int addBitmap(const SkBitmap& bitmap);
156 void addMatrix(const SkMatrix& matrix); 155 void addMatrix(const SkMatrix& matrix);
157 void addPaint(const SkPaint& paint) { this->addPaintPtr(&paint); } 156 void addPaint(const SkPaint& paint) { this->addPaintPtr(&paint); }
158 void addPaintPtr(const SkPaint* paint); 157 void addPaintPtr(const SkPaint* paint);
159 void addPatch(const SkPoint cubics[12]); 158 void addPatch(const SkPoint cubics[12]);
160 void addPath(const SkPath& path); 159 void addPath(const SkPath& path);
161 void addPicture(const SkPicture* picture); 160 void addPicture(const SkPicture* picture);
162 void addPoint(const SkPoint& point); 161 void addPoint(const SkPoint& point);
163 void addPoints(const SkPoint pts[], int count); 162 void addPoints(const SkPoint pts[], int count);
164 void addRect(const SkRect& rect); 163 void addRect(const SkRect& rect);
165 void addRectPtr(const SkRect* rect); 164 void addRectPtr(const SkRect* rect);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 245
247 uint32_t fRecordFlags; 246 uint32_t fRecordFlags;
248 int fInitialSaveCount; 247 int fInitialSaveCount;
249 248
250 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c onstructor 249 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c onstructor
251 250
252 typedef SkCanvas INHERITED; 251 typedef SkCanvas INHERITED;
253 }; 252 };
254 253
255 #endif 254 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPictureRecord.cpp » ('j') | src/core/SkPictureRecord.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698