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

Unified Diff: src/core/SkPictureData.h

Issue 1199473002: change old picture serialization to really handle images (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix check in new_array function Created 5 years, 6 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 | « src/core/SkImageGeneratorPriv.h ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureData.h
diff --git a/src/core/SkPictureData.h b/src/core/SkPictureData.h
index cada8d1f6632b349238172cec96aa811546046a4..1a490ce6e426cc0f456cbdc2be58ab142bf97bbc 100644
--- a/src/core/SkPictureData.h
+++ b/src/core/SkPictureData.h
@@ -51,6 +51,7 @@ struct SkPictInfo {
#define SK_PICT_PAINT_BUFFER_TAG SkSetFourByteTag('p', 'n', 't', ' ')
#define SK_PICT_PATH_BUFFER_TAG SkSetFourByteTag('p', 't', 'h', ' ')
#define SK_PICT_TEXTBLOB_BUFFER_TAG SkSetFourByteTag('b', 'l', 'o', 'b')
+#define SK_PICT_IMAGE_BUFFER_TAG SkSetFourByteTag('i', 'm', 'a', 'g')
// Always write this guy last (with no length field afterwards)
#define SK_PICT_EOF_TAG SkSetFourByteTag('e', 'o', 'f', ' ')
@@ -90,6 +91,11 @@ public:
return fBitmaps[index];
}
+ const SkImage* getImage(SkReader32* reader) const {
+ const int index = reader->readInt();
+ return fImageRefs[index];
+ }
+
const SkPath& getPath(SkReader32* reader) const {
int index = reader->readInt() - 1;
return fPaths[index];
@@ -156,6 +162,8 @@ private:
int fPictureCount;
const SkTextBlob** fTextBlobRefs;
int fTextBlobCount;
+ const SkImage** fImageRefs;
+ int fImageCount;
SkPictureContentInfo fContentInfo;
« no previous file with comments | « src/core/SkImageGeneratorPriv.h ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698