aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkLua.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-03-18 07:25:55 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-18 07:25:55 -0700
commitca2622ba051829fed5f30facd74c5b41cd4b931c (patch)
tree3d8248b7764e500f857b3d6cfb6866e72b632199 /src/utils/SkLua.cpp
parenteb75c7db3a7372de68347d0df8d58acebc33a9ad (diff)
return pictures as sk_sp
Diffstat (limited to 'src/utils/SkLua.cpp')
-rw-r--r--src/utils/SkLua.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp
index 868a8250ef..56e2b41a45 100644
--- a/src/utils/SkLua.cpp
+++ b/src/utils/SkLua.cpp
@@ -1824,12 +1824,12 @@ static int lpicturerecorder_getCanvas(lua_State* L) {
}
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;
}