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

Unified Diff: gm/rectangletexture.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/image_shader.cpp ('k') | include/core/SkImage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rectangletexture.cpp
diff --git a/gm/rectangletexture.cpp b/gm/rectangletexture.cpp
index 0889063a1f1d9916f340f00faf997d3e58089002..20f2ead593674d3dfa52b2b006530769e5beb849 100644
--- a/gm/rectangletexture.cpp
+++ b/gm/rectangletexture.cpp
@@ -164,15 +164,15 @@ protected:
SkPaint clampPaint;
clampPaint.setFilterQuality(q);
- clampPaint.setShader(rectImg->newShader(SkShader::kClamp_TileMode,
- SkShader::kClamp_TileMode))->unref();
+ clampPaint.setShader(rectImg->makeShader(SkShader::kClamp_TileMode,
+ SkShader::kClamp_TileMode));
canvas->drawRect(SkRect::MakeWH(1.5f * kWidth, 1.5f * kHeight), clampPaint);
canvas->translate(kWidth * 1.5f + kPad, 0);
SkPaint repeatPaint;
repeatPaint.setFilterQuality(q);
- repeatPaint.setShader(rectImg->newShader(SkShader::kRepeat_TileMode,
- SkShader::kMirror_TileMode))->unref();
+ repeatPaint.setShader(rectImg->makeShader(SkShader::kRepeat_TileMode,
+ SkShader::kMirror_TileMode));
canvas->drawRect(SkRect::MakeWH(1.5f * kWidth, 1.5f * kHeight), repeatPaint);
canvas->translate(1.5f * kWidth + kPad, 0);
}
« no previous file with comments | « gm/image_shader.cpp ('k') | include/core/SkImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698