change old picture serialization to really handle images
BUG=skia:3965
Review URL: https://codereview.chromium.org/1199473002
diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h
index 2aeb69d..0b6ef8b 100644
--- a/src/core/SkPictureRecord.h
+++ b/src/core/SkPictureRecord.h
@@ -37,6 +37,10 @@
return fTextBlobRefs;
}
+ const SkTDArray<const SkImage* >& getImageRefs() const {
+ return fImageRefs;
+ }
+
SkData* opData(bool deepCopy) const {
this->validate(fWriter.bytesWritten(), 0);
@@ -118,6 +122,7 @@
}
void addBitmap(const SkBitmap& bitmap);
+ void addImage(const SkImage*);
void addMatrix(const SkMatrix& matrix);
void addPaint(const SkPaint& paint) { this->addPaintPtr(&paint); }
void addPaintPtr(const SkPaint* paint);
@@ -223,6 +228,7 @@
SkWriter32 fWriter;
// we ref each item in these arrays
+ SkTDArray<const SkImage*> fImageRefs;
SkTDArray<const SkPicture*> fPictureRefs;
SkTDArray<const SkTextBlob*> fTextBlobRefs;