Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3106)

Unified Diff: src/utils/SkLua.cpp

Issue 1829303002: move setshader to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: addressing comments from #8 Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFShader.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkLua.cpp
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp
index c25bbf4409ffe412cadc4a1f20a0f9679bac975e..01bf507f170052504bb40206434bb64339c43e33 100644
--- a/src/utils/SkLua.cpp
+++ b/src/utils/SkLua.cpp
@@ -1146,7 +1146,7 @@ static int lpaint_getShader(lua_State* L) {
static int lpaint_setShader(lua_State* L) {
SkPaint* paint = get_obj<SkPaint>(L, 1);
- paint->setShader(get_ref<SkShader>(L, 2));
+ paint->setShader(sk_ref_sp(get_ref<SkShader>(L, 2)));
return 0;
}
« no previous file with comments | « src/pdf/SkPDFShader.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698