From ca2622ba051829fed5f30facd74c5b41cd4b931c Mon Sep 17 00:00:00 2001 From: reed Date: Fri, 18 Mar 2016 07:25:55 -0700 Subject: return pictures as sk_sp BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1811703002 Review URL: https://codereview.chromium.org/1811703002 --- bench/PictureNestingBench.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'bench/PictureNestingBench.cpp') diff --git a/bench/PictureNestingBench.cpp b/bench/PictureNestingBench.cpp index a968d51db5..abe89368f9 100644 --- a/bench/PictureNestingBench.cpp +++ b/bench/PictureNestingBench.cpp @@ -74,8 +74,7 @@ protected: c->restore(); if (recordPicture) { - SkAutoTUnref picture(recorder.endRecording()); - canvas->drawPicture(picture); + canvas->drawPicture(recorder.finishRecordingAsPicture()); } return pics; @@ -125,7 +124,7 @@ protected: SkCanvas* c = recorder.beginRecording(SkIntToScalar(canvasSize.x()), SkIntToScalar(canvasSize.y())); this->doDraw(c); - SkAutoTUnref picture(recorder.endRecording()); + (void)recorder.finishRecordingAsPicture(); } } @@ -148,7 +147,7 @@ protected: SkIntToScalar(canvasSize.y())); this->doDraw(c); - fPicture.reset(recorder.endRecording()); + fPicture = recorder.finishRecordingAsPicture(); } void onDraw(int loops, SkCanvas* canvas) override { @@ -158,7 +157,7 @@ protected: } private: - SkAutoTUnref fPicture; + sk_sp fPicture; typedef PictureNesting INHERITED; }; -- cgit v1.2.3