diff options
author | reed <reed@google.com> | 2016-03-18 07:25:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-18 07:25:55 -0700 |
commit | ca2622ba051829fed5f30facd74c5b41cd4b931c (patch) | |
tree | 3d8248b7764e500f857b3d6cfb6866e72b632199 /bench/PictureNestingBench.cpp | |
parent | eb75c7db3a7372de68347d0df8d58acebc33a9ad (diff) |
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
Diffstat (limited to 'bench/PictureNestingBench.cpp')
-rw-r--r-- | bench/PictureNestingBench.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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<SkPicture> 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<SkPicture> 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<SkPicture> fPicture; + sk_sp<SkPicture> fPicture; typedef PictureNesting INHERITED; }; |