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

Unified Diff: src/core/SkPictureData.cpp

Issue 2230973002: remove support for serializing bitmaps in old format (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkPictureRecord.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureData.cpp
diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp
index 873c0c4a1d913c9e78205273bde25ef14aad721e..1e946aaa9749d3cfccd98a5d0b6a6ad211c86084 100644
--- a/src/core/SkPictureData.cpp
+++ b/src/core/SkPictureData.cpp
@@ -43,7 +43,7 @@ SkPictureData::SkPictureData(const SkPictureRecord& record,
fContentInfo.set(record.fContentInfo);
- fBitmaps = record.fBitmaps;
+ fBitmaps.reset(); // we never make bitmaps (anymore) during recording
fPaints = record.fPaints;
fPaths.reset(record.fPaths.count());
@@ -223,12 +223,8 @@ void SkPictureData::WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec) {
void SkPictureData::flattenToBuffer(SkWriteBuffer& buffer) const {
int i, n;
- if ((n = fBitmaps.count()) > 0) {
- write_tag_size(buffer, SK_PICT_BITMAP_BUFFER_TAG, n);
- for (i = 0; i < n; i++) {
- buffer.writeBitmap(fBitmaps[i]);
- }
- }
+ // we never record bitmaps anymore, only images
+ SkASSERT(fBitmaps.count() == 0);
if ((n = fPaints.count()) > 0) {
write_tag_size(buffer, SK_PICT_PAINT_BUFFER_TAG, n);
« no previous file with comments | « no previous file | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698