diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-28 18:05:47 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-28 18:05:47 +0000 |
commit | 0943f5f58abcff15c7583faafe44549b9a44f47a (patch) | |
tree | 837e0d28f96db235761f0017ae86f77879d888ca /include | |
parent | d643a90ee248d22ec8260512812dee6d463de555 (diff) |
Thread picture version through to SkReadBuffer.
This will let code outside SkPicture* fork its read code based on the picture version.
BUG=skia:
R=reed@google.com, robertphillips@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/214413008
git-svn-id: http://skia.googlecode.com/svn/trunk@13984 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkReadBuffer.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/core/SkReadBuffer.h b/include/core/SkReadBuffer.h index dd3301ec13..3befb42512 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; |