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

Unified Diff: gm/tinybitmap.cpp

Issue 1793303002: Reland of "more shader-->sp conversions (patchset #5 id:80001 of https://codereview.chromium… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make pictureRef a value, so its clearer what's going on 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/tilemodes_scaled.cpp ('k') | gm/transparency.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « gm/tilemodes_scaled.cpp ('k') | gm/transparency.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698