diff options
author | borenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-09-17 18:26:06 +0000 |
---|---|---|
committer | borenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-09-17 18:26:06 +0000 |
commit | 66bcbd12bf075145e0c38f3e36c9f13e65f5e10e (patch) | |
tree | 73620cc4ffbd47994399f4f96c77456c5ff0a8d0 /include | |
parent | 7534747e631c49680f7199ccf9e71a359cfa647d (diff) |
Check for invalid SkPictures
- Remove hasRecorded() since nobody uses it.
- Add "success" boolean to SkPicture stream constructor
- Track failures in render_pictures and bench_pictures
Review URL: https://codereview.appspot.com/6493105
git-svn-id: http://skia.googlecode.com/svn/trunk@5573 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkPicture.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h index 2b61c42032..00eadb83a6 100644 --- a/include/core/SkPicture.h +++ b/include/core/SkPicture.h @@ -38,10 +38,10 @@ public: */ SkPicture(const SkPicture& src); /** - * Recreate a picture that was serialized into a stream. If an error occurs - * the picture will be "empty" : width and height == 0 + * Recreate a picture that was serialized into a stream. *success is set to + * true if the picture was deserialized successfully and false otherwise. */ - explicit SkPicture(SkStream*); + explicit SkPicture(SkStream*, bool* success = NULL); virtual ~SkPicture(); /** @@ -112,11 +112,6 @@ public: */ void endRecording(); - /** Returns true if any draw commands have been recorded since the last - call to beginRecording. - */ - bool hasRecorded() const; - /** Replays the drawing commands on the specified canvas. This internally calls endRecording() if that has not already been called. @param surface the canvas receiving the drawing commands. |