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

Unified Diff: include/core/SkReadBuffer.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 | « debugger/QT/SkDebuggerGUI.cpp ('k') | src/core/SkPicture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkReadBuffer.h
diff --git a/include/core/SkReadBuffer.h b/include/core/SkReadBuffer.h
index dd3301ec133b9ccd9c188467a0d9bdf077fe7f65..3befb4251224f96425a6d96c12606e3f00485f2f 100644
--- a/include/core/SkReadBuffer.h
+++ b/include/core/SkReadBuffer.h
@@ -41,6 +41,15 @@ public:
SkReadBuffer(SkStream* stream);
virtual ~SkReadBuffer();
+ /** Return the version of the serialized picture this buffer holds, or 0 if unset. */
+ int pictureVersion() const { return fPictureVersion; }
+
+ /** This may be called at most once; most clients of SkReadBuffer should not mess with it. */
+ void setPictureVersion(int version) {
+ SkASSERT(0 == fPictureVersion);
+ fPictureVersion = version;
+ }
+
enum Flags {
kCrossProcess_Flag = 1 << 0,
kScalarIsFloat_Flag = 1 << 1,
@@ -184,6 +193,7 @@ private:
bool readArray(void* value, size_t size, size_t elementSize);
uint32_t fFlags;
+ int fPictureVersion;
void* fMemoryPtr;
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698