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

Unified Diff: src/core/SkPicturePlayback.h

Issue 24826002: Allow creating a picture from skp to fail. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Interesting bit - return false on error. Created 7 years, 3 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 06d180fb4400ef14d1b73fcdc57347b83d46b158..144aa2f0e7f934da016aeeee1a473cc1bb10a0d0 100644
--- a/src/core/SkPicturePlayback.h
+++ b/src/core/SkPicturePlayback.h
@@ -62,7 +62,7 @@ public:
SkPicturePlayback();
SkPicturePlayback(const SkPicturePlayback& src, SkPictCopyInfo* deepCopyInfo = NULL);
explicit SkPicturePlayback(const SkPictureRecord& record, bool deepCopy = false);
- SkPicturePlayback(SkStream*, const SkPictInfo&, SkPicture::InstallPixelRefProc);
+ SkPicturePlayback(SkStream*, const SkPictInfo&, bool* isValid, SkPicture::InstallPixelRefProc);
virtual ~SkPicturePlayback();
@@ -191,9 +191,9 @@ public:
#endif
private: // these help us with reading/writing
- void parseStreamTag(SkStream*, const SkPictInfo&, uint32_t tag, size_t size,
+ bool parseStreamTag(SkStream*, const SkPictInfo&, uint32_t tag, size_t size,
SkPicture::InstallPixelRefProc);
- void parseBufferTag(SkOrderedReadBuffer&, uint32_t tag, size_t size);
+ bool parseBufferTag(SkOrderedReadBuffer&, uint32_t tag, size_t size);
void flattenToBuffer(SkOrderedWriteBuffer&) const;
private:

Powered by Google App Engine
This is Rietveld 408576698