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

Unified Diff: src/utils/SkLua.cpp

Issue 1785473002: SkImage now has makeShader to return sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use build guard for impl of newShader 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/image/SkImageShader.cpp ('k') | tests/FlattenableFactoryToName.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 b84ba0f5188e844c14d1c3805eb91f7f71f22d05..95ca5adc07389eed82a984a6f6f88d04b16df81a 100644
--- a/src/utils/SkLua.cpp
+++ b/src/utils/SkLua.cpp
@@ -1711,8 +1711,7 @@ static int limage_height(lua_State* L) {
static int limage_newShader(lua_State* L) {
SkShader::TileMode tmode = SkShader::kClamp_TileMode;
const SkMatrix* localM = nullptr;
- SkAutoTUnref<SkShader> shader(get_ref<SkImage>(L, 1)->newShader(tmode, tmode, localM));
- push_ref(L, shader.get());
+ push_ref(L, get_ref<SkImage>(L, 1)->makeShader(tmode, tmode, localM));
return 1;
}
« no previous file with comments | « src/image/SkImageShader.cpp ('k') | tests/FlattenableFactoryToName.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698