| Index: include/core/SkPicture.h
|
| diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
|
| index 4c7e4b33991e44ba1ff19107437ed32fa4ac80bc..e2d7d1aeae5cfca6a387829c68dc00522444db1c 100644
|
| --- a/include/core/SkPicture.h
|
| +++ b/include/core/SkPicture.h
|
| @@ -68,6 +68,14 @@ public:
|
| static SkPicture* CreateFromStream(SkStream*,
|
| InstallPixelRefProc proc = &SkImageDecoder::DecodeMemory);
|
|
|
| + /**
|
| + * Recreate a picture that was serialized into a buffer.
|
| + * @param SkFlattenableReadBuffer Serialized picture data.
|
| + * @return A new SkPicture representing the serialized data, or NULL if the buffer is
|
| + * invalid.
|
| + */
|
| + static SkPicture* CreateFromBuffer(SkFlattenableReadBuffer&);
|
| +
|
| virtual ~SkPicture();
|
|
|
| /**
|
| @@ -187,6 +195,11 @@ public:
|
| void serialize(SkWStream*, EncodeBitmap encoder = NULL) const;
|
|
|
| /**
|
| + * Serialize to a buffer.
|
| + */
|
| + void flatten(SkFlattenableWriteBuffer&) const;
|
| +
|
| + /**
|
| * Returns true if any bitmaps may be produced when this SkPicture
|
| * is replayed.
|
| * Returns false if called while still recording.
|
| @@ -247,6 +260,7 @@ protected:
|
| // will be ready to be parsed to create an SkPicturePlayback.
|
| // If false is returned, SkPictInfo is unmodified.
|
| static bool StreamIsSKP(SkStream*, SkPictInfo*);
|
| + static bool BufferIsSKP(SkFlattenableReadBuffer&, SkPictInfo*);
|
| private:
|
| friend class SkFlatPicture;
|
| friend class SkPicturePlayback;
|
|
|