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

Unified Diff: gm/tinybitmap.cpp

Issue 1790353002: Revert of 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
« 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 1162b2d2d13adaccd7f0b09ec6f482f2cc11fc2e..7942b4266afb3e27a492ac5e4f29ecd725e0ab1f 100644
--- a/gm/tinybitmap.cpp
+++ b/gm/tinybitmap.cpp
@@ -44,10 +44,12 @@
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(SkShader::MakeBitmapShader(bm, SkShader::kRepeat_TileMode,
- SkShader::kMirror_TileMode));
+ paint.setShader(s)->unref();
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