aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleFilterQuality.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-03-09 14:47:34 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-09 14:47:34 -0800
commit5671c5b9124f17d33bc14b6d347cdc6fe5d19dc8 (patch)
tree534c601a0a5f7d45cfc69d65485dc086f621cd24 /samplecode/SampleFilterQuality.cpp
parent6ceeebd37a43d879c120b6ba100ae1febdd67a18 (diff)
SkImage now has makeShader to return sk_sp
Diffstat (limited to 'samplecode/SampleFilterQuality.cpp')
-rw-r--r--samplecode/SampleFilterQuality.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/samplecode/SampleFilterQuality.cpp b/samplecode/SampleFilterQuality.cpp
index c37fcae457..27c092fc47 100644
--- a/samplecode/SampleFilterQuality.cpp
+++ b/samplecode/SampleFilterQuality.cpp
@@ -27,7 +27,7 @@ static SkSurface* make_surface(SkCanvas* canvas, const SkImageInfo& info) {
return surface;
}
-static SkShader* make_shader(const SkRect& bounds) {
+static sk_sp<SkShader> make_shader(const SkRect& bounds) {
#if 0
const SkPoint pts[] = {
{ bounds.left(), bounds.top() },
@@ -45,7 +45,7 @@ static SkShader* make_shader(const SkRect& bounds) {
if (nullptr == image) {
return nullptr;
}
- return image->newShader(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode);
+ return image->makeShader(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode);
#endif
}
@@ -67,7 +67,7 @@ static SkImage* make_image() {
path.moveTo(0, 0); path.lineTo(N, 0); path.lineTo(0, N); path.close();
SkPaint paint;
- SkSafeUnref(paint.setShader(make_shader(SkRect::MakeWH(N, N))));
+ paint.setShader(make_shader(SkRect::MakeWH(N, N)));
canvas->drawPath(path, paint);
return surface->newImageSnapshot();