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

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: 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
Index: src/core/SkPicturePlayback.h
diff --git a/src/core/SkPicturePlayback.h b/src/core/SkPicturePlayback.h
index 89d70a1739d8623cf5c5ae3148b0ca61bd1176b4..ea9f0f17fdd800d19f74ca2d3ed38061d8069569 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,7 @@ public:
void resetOpID() { fCurOffset = 0; }
protected:
- bool parseStream(SkStream*, const SkPictInfo&,
- SkPicture::InstallPixelRefProc);
+ bool parseStream(SkStream*, SkPicture::InstallPixelRefProc);
bool parseBuffer(SkReadBuffer& buffer);
#ifdef SK_DEVELOPER
virtual bool preDraw(int opIndex, int type);
@@ -117,6 +116,8 @@ protected:
void preLoadBitmaps(const SkTDArray<void*>* results);
private:
+ explicit SkPicturePlayback(const SkPictInfo& info);
+
class TextContainer {
public:
size_t length() { return fByteLength; }
@@ -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;
+ SkPictInfo fInfo;
reed1 2014/03/27 20:58:14 can this guy be const?
mtklein 2014/03/27 21:02:48 Yep, done.
+
#ifdef SK_BUILD_FOR_ANDROID
SkMutex fDrawMutex;
bool fAbortCurrentPlayback;

Powered by Google App Engine
This is Rietveld 408576698