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

Unified Diff: src/core/SkPicturePlayback.h

Issue 214413008: Thread picture version through to SkReadBuffer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: debugger too Created 6 years, 9 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/SkPicture.cpp ('k') | src/core/SkPicturePlayback.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicturePlayback.h
diff --git a/src/core/SkPicturePlayback.h b/src/core/SkPicturePlayback.h
index 89d70a1739d8623cf5c5ae3148b0ca61bd1176b4..5fc52aeb9c5357310ae1f25bf09d769edfe96531 100644
--- a/src/core/SkPicturePlayback.h
+++ b/src/core/SkPicturePlayback.h
@@ -76,12 +76,12 @@ struct SkPictCopyInfo {
class SkPicturePlayback {
public:
- SkPicturePlayback();
SkPicturePlayback(const SkPicturePlayback& src, SkPictCopyInfo* deepCopyInfo = NULL);
- explicit SkPicturePlayback(const SkPictureRecord& record, bool deepCopy = false);
- static SkPicturePlayback* CreateFromStream(SkStream*, const SkPictInfo&,
+ SkPicturePlayback(const SkPictureRecord& record, const SkPictInfo&, bool deepCopy = false);
+ static SkPicturePlayback* CreateFromStream(SkStream*,
+ const SkPictInfo&,
SkPicture::InstallPixelRefProc);
- static SkPicturePlayback* CreateFromBuffer(SkReadBuffer&);
+ static SkPicturePlayback* CreateFromBuffer(SkReadBuffer&, const SkPictInfo&);
virtual ~SkPicturePlayback();
@@ -106,8 +106,9 @@ public:
void resetOpID() { fCurOffset = 0; }
protected:
- bool parseStream(SkStream*, const SkPictInfo&,
- SkPicture::InstallPixelRefProc);
+ explicit SkPicturePlayback(const SkPictInfo& info);
+
+ bool parseStream(SkStream*, SkPicture::InstallPixelRefProc);
bool parseBuffer(SkReadBuffer& buffer);
#ifdef SK_DEVELOPER
virtual bool preDraw(int opIndex, int type);
@@ -217,8 +218,7 @@ public:
#endif
private: // these help us with reading/writing
- bool parseStreamTag(SkStream*, const SkPictInfo&, uint32_t tag, size_t size,
- SkPicture::InstallPixelRefProc);
+ bool parseStreamTag(SkStream*, uint32_t tag, size_t size, SkPicture::InstallPixelRefProc);
bool parseBufferTag(SkReadBuffer&, uint32_t tag, size_t size);
void flattenToBuffer(SkWriteBuffer&) const;
@@ -271,6 +271,8 @@ private:
// The offset of the current operation when within the draw method
size_t fCurOffset;
+ const SkPictInfo fInfo;
+
#ifdef SK_BUILD_FOR_ANDROID
SkMutex fDrawMutex;
bool fAbortCurrentPlayback;
« no previous file with comments | « src/core/SkPicture.cpp ('k') | src/core/SkPicturePlayback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698