Index: gm/shadows.cpp |
diff --git a/gm/shadows.cpp b/gm/shadows.cpp |
index 5696240d21ed3ca00b7603b0b8ce0ff53b6e3c85..bb2bf3c5bd3cd287ed316f2f3005068d1126a85f 100644 |
--- a/gm/shadows.cpp |
+++ b/gm/shadows.cpp |
@@ -128,11 +128,12 @@ |
canvas->drawBitmap(fBitmap, 10, 10, &paint); |
canvas->translate(0, 40); |
- paint.setShader(SkShader::MakeBitmapShader( |
+ SkAutoTUnref<SkShader> shader(SkShader::CreateBitmapShader( |
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); |