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

Unified Diff: gm/image_shader.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 | « gm/colorfilterimagefilter.cpp ('k') | gm/rectangletexture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/image_shader.cpp
diff --git a/gm/image_shader.cpp b/gm/image_shader.cpp
index 084bb95a1aa3aa1981cd630f531a07e6ba766cff..7ea020229611b796daa1318c0568ac51c94d3be2 100644
--- a/gm/image_shader.cpp
+++ b/gm/image_shader.cpp
@@ -101,10 +101,9 @@ protected:
const SkShader::TileMode tile = SkShader::kRepeat_TileMode;
const SkMatrix localM = SkMatrix::MakeTrans(-50, -50);
- SkAutoTUnref<SkShader> shader(image->newShader(tile, tile, &localM));
SkPaint paint;
+ paint.setShader(image->makeShader(tile, tile, &localM));
paint.setAntiAlias(true);
- paint.setShader(shader);
canvas->drawCircle(50, 50, 50, paint);
}
« no previous file with comments | « gm/colorfilterimagefilter.cpp ('k') | gm/rectangletexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698