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

Unified Diff: gm/tinybitmap.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/tinybitmap.cpp
diff --git a/gm/tinybitmap.cpp b/gm/tinybitmap.cpp
index 7942b4266afb3e27a492ac5e4f29ecd725e0ab1f..1162b2d2d13adaccd7f0b09ec6f482f2cc11fc2e 100644
--- a/gm/tinybitmap.cpp
+++ b/gm/tinybitmap.cpp
@@ -44,12 +44,10 @@ protected:
virtual void onDraw(SkCanvas* canvas) {
SkBitmap bm = make_bitmap();
- SkShader* s =
- SkShader::CreateBitmapShader(bm, SkShader::kRepeat_TileMode,
- SkShader::kMirror_TileMode);
SkPaint paint;
paint.setAlpha(0x80);
- paint.setShader(s)->unref();
+ paint.setShader(SkShader::MakeBitmapShader(bm, SkShader::kRepeat_TileMode,
+ SkShader::kMirror_TileMode));
canvas->drawPaint(paint);
}
« gm/pictureshadertile.cpp ('K') | « gm/tilemodes_scaled.cpp ('k') | gm/transparency.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698