aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPicturePlayback.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-12 14:46:41 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-12 14:46:41 +0000
commit9e5f85e89d03a850d435fc951e74e9861a0c1bdd (patch)
treeb42ed92b9bd943cfb3321008d05e5746263cb0e9 /src/core/SkPicturePlayback.h
parentb6401863fbeb7bf5c12d88fb9de78c7b5a346457 (diff)
Fixing SkPicture serialization
Fixed a few issues while attempting to use the new serialization path for SkPicture inside a fuzzer: - SkReadBuffer and SkValidatingReadBuffer both had a fReader member instead of sharing the same member, which leads to problems if a base class function is used - In SkPicture, a header is now written as a single chunk of data, so it also has to be read as a single chunk of data - In the SkPicturePlayback destructor, a bad deserialization would lead to a crash if we don't safely unref fOpData - Also in SkPicturePlayback, if we only use a ReadBuffer for the whole deserialization, additional tags must be added to parseBufferTag() - SkValidatingReadBuffer::readBitmap() was broken, but this path wasn't usen't since the only use case for SkValidatingReadBuffer is currently image filters and bitmaps are unflattened as part of the deserialization of SkBitmapSource - SkPictureImageFilter was not deserializable. Added it to SkGlobalInitialization* - Added a test that exercises the SkPicture serialization / deserialization code BUG=skia: R=senorblanco@google.com, senorblanco@chromium.org, reed@google.com, robertphillips@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/195223003 git-svn-id: http://skia.googlecode.com/svn/trunk@13764 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPicturePlayback.h')
-rw-r--r--src/core/SkPicturePlayback.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/SkPicturePlayback.h b/src/core/SkPicturePlayback.h
index 178a408aee..512f24a77e 100644
--- a/src/core/SkPicturePlayback.h
+++ b/src/core/SkPicturePlayback.h
@@ -40,6 +40,7 @@ struct SkPictInfo {
kPtrIs64Bit_Flag = 1 << 2,
};
+ char fMagic[8];
uint32_t fVersion;
uint32_t fWidth;
uint32_t fHeight;