aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPictureRecorder.h
diff options
context:
space:
mode:
authorGravatar jbroman <jbroman@chromium.org>2015-04-09 06:12:17 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-09 06:12:17 -0700
commit7d1b945da6afdfb50372fd7b69153710d7793a52 (patch)
tree460bf8a935abe42388136b5518144c87d25db690 /include/core/SkPictureRecorder.h
parentd9f8862ab6bed4195cbfe5dda48693e1062b01e2 (diff)
Mark SkPictureRecorder::endRecording as SK_WARN_UNUSED_RESULT.
Ignoring the result is a memory leak. Callers should always at least unref the result. This bug has occurred in Blink: https://codereview.chromium.org/1068413002/ BUG=skia:3680 Review URL: https://codereview.chromium.org/1072633002
Diffstat (limited to 'include/core/SkPictureRecorder.h')
-rw-r--r--include/core/SkPictureRecorder.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h
index 0459737e1f..2cf7909cf3 100644
--- a/include/core/SkPictureRecorder.h
+++ b/include/core/SkPictureRecorder.h
@@ -67,7 +67,7 @@ public:
* reflect their current state, but will not contain a live reference to the drawables
* themselves.
*/
- SkPicture* endRecordingAsPicture();
+ SkPicture* SK_WARN_UNUSED_RESULT endRecordingAsPicture();
/**
* Signal that the caller is done recording. This invalidates the canvas returned by
@@ -79,10 +79,10 @@ public:
* and therefore this drawable will reflect the current state of those nested drawables anytime
* it is drawn or a new picture is snapped from it (by calling drawable->newPictureSnapshot()).
*/
- SkDrawable* endRecordingAsDrawable();
+ SkDrawable* SK_WARN_UNUSED_RESULT endRecordingAsDrawable();
// Legacy API -- use endRecordingAsPicture instead.
- SkPicture* endRecording() { return this->endRecordingAsPicture(); }
+ SkPicture* SK_WARN_UNUSED_RESULT endRecording() { return this->endRecordingAsPicture(); }
private:
void reset();