Index: gm/bitmapshader.cpp |
diff --git a/gm/bitmapshader.cpp b/gm/bitmapshader.cpp |
index 5d7b35c2cd46dc10061afe5c7ff69faaad00464e..491905afb31346c1b7b095510e5bbd2076b6e177 100644 |
--- a/gm/bitmapshader.cpp |
+++ b/gm/bitmapshader.cpp |
@@ -35,11 +35,6 @@ static void draw_mask(SkBitmap* bm) { |
canvas.drawCircle(10, 10, 10, circlePaint); |
} |
-static void adopt_shader(SkPaint* paint, SkShader* shader) { |
- paint->setShader(shader); |
- SkSafeUnref(shader); |
-} |
- |
class BitmapShaderGM : public GM { |
protected: |
@@ -69,8 +64,8 @@ protected: |
} |
canvas->save(); |
- adopt_shader(&paint, SkShader::CreateBitmapShader(fBitmap, SkShader::kClamp_TileMode, |
- SkShader::kClamp_TileMode, &s)); |
+ paint.setShader(SkShader::MakeBitmapShader(fBitmap, SkShader::kClamp_TileMode, |
+ SkShader::kClamp_TileMode, &s)); |
// draw the shader with a bitmap mask |
canvas->drawBitmap(fMask, 0, 0, &paint); |
@@ -91,8 +86,8 @@ protected: |
canvas->translate(0, 25); |
- adopt_shader(&paint, SkShader::CreateBitmapShader(fMask, SkShader::kRepeat_TileMode, |
- SkShader::kRepeat_TileMode, &s)); |
+ paint.setShader(SkShader::MakeBitmapShader(fMask, SkShader::kRepeat_TileMode, |
+ SkShader::kRepeat_TileMode, &s)); |
paint.setColor(SK_ColorRED); |
// draw the mask using the shader and a color |