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); |
} |