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

Unified Diff: src/core/SkPicturePlayback.h

Issue 138063005: Serialization of SkPictureImageFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 11 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
Index: src/core/SkPicturePlayback.h
diff --git a/src/core/SkPicturePlayback.h b/src/core/SkPicturePlayback.h
index 6eb9ac3425767680edaaa09131b16b4ac3c39fb5..5d0e9f230911c30765d94ffb4c73e4e4d8982d43 100644
--- a/src/core/SkPicturePlayback.h
+++ b/src/core/SkPicturePlayback.h
@@ -64,12 +64,14 @@ public:
explicit SkPicturePlayback(const SkPictureRecord& record, bool deepCopy = false);
static SkPicturePlayback* CreateFromStream(SkStream*, const SkPictInfo&,
SkPicture::InstallPixelRefProc);
+ static SkPicturePlayback* CreateFromBuffer(SkFlattenableReadBuffer&);
virtual ~SkPicturePlayback();
void draw(SkCanvas& canvas, SkDrawPictureCallback*);
void serialize(SkWStream*, SkPicture::EncodeBitmap) const;
+ void flatten(SkFlattenableWriteBuffer&) const;
void dumpSize() const;
@@ -84,6 +86,7 @@ public:
protected:
bool parseStream(SkStream*, const SkPictInfo&,
SkPicture::InstallPixelRefProc);
+ bool parseBuffer(SkFlattenableReadBuffer& buffer);
#ifdef SK_DEVELOPER
virtual bool preDraw(int opIndex, int type);
virtual void postDraw(int opIndex);
@@ -198,8 +201,8 @@ public:
private: // these help us with reading/writing
bool parseStreamTag(SkStream*, const SkPictInfo&, uint32_t tag, size_t size,
SkPicture::InstallPixelRefProc);
- bool parseBufferTag(SkOrderedReadBuffer&, uint32_t tag, size_t size);
- void flattenToBuffer(SkOrderedWriteBuffer&) const;
+ bool parseBufferTag(SkFlattenableReadBuffer&, uint32_t tag, size_t size);
+ void flattenToBuffer(SkFlattenableWriteBuffer&) const;
private:
// Only used by getBitmap() if the passed in index is SkBitmapHeap::INVALID_SLOT. This empty

Powered by Google App Engine
This is Rietveld 408576698