commit | ca2622ba051829fed5f30facd74c5b41cd4b931c | [log] [tgz] |
---|---|---|
author | reed <reed@google.com> | Fri Mar 18 07:25:55 2016 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Fri Mar 18 07:25:55 2016 -0700 |
tree | 3d8248b7764e500f857b3d6cfb6866e72b632199 | |
parent | eb75c7db3a7372de68347d0df8d58acebc33a9ad [diff] [blame] |
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
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp index 868a825..56e2b41 100644 --- a/src/utils/SkLua.cpp +++ b/src/utils/SkLua.cpp
@@ -1824,12 +1824,12 @@ } static int lpicturerecorder_endRecording(lua_State* L) { - SkPicture* pic = get_obj<SkPictureRecorder>(L, 1)->endRecording(); - if (nullptr == pic) { + sk_sp<SkPicture> pic = get_obj<SkPictureRecorder>(L, 1)->finishRecordingAsPicture(); + if (!pic) { lua_pushnil(L); return 1; } - push_ref(L, pic)->unref(); + push_ref(L, std::move(pic)); return 1; }