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

Unified Diff: gm/shadows.cpp

Issue 1789633002: more shader-->sp conversions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
Index: gm/shadows.cpp
diff --git a/gm/shadows.cpp b/gm/shadows.cpp
index bb2bf3c5bd3cd287ed316f2f3005068d1126a85f..5696240d21ed3ca00b7603b0b8ce0ff53b6e3c85 100644
--- a/gm/shadows.cpp
+++ b/gm/shadows.cpp
@@ -128,12 +128,11 @@ protected:
canvas->drawBitmap(fBitmap, 10, 10, &paint);
canvas->translate(0, 40);
- SkAutoTUnref<SkShader> shader(SkShader::CreateBitmapShader(
+ paint.setShader(SkShader::MakeBitmapShader(
fBitmap, SkShader::kRepeat_TileMode,
SkShader::kRepeat_TileMode));
// see bug.skia.org/562 (shows bug as reported)
- paint.setShader(shader);
paint.setStyle(SkPaint::kFill_Style);
canvas->drawRect(SkRect::MakeXYWH(10, 10, 20, 20), paint);
paint.setShader(nullptr);
« gm/pictureshadertile.cpp ('K') | « gm/shadertext3.cpp ('k') | gm/shallowgradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698