Index: gm/perspshaders.cpp |
diff --git a/gm/perspshaders.cpp b/gm/perspshaders.cpp |
index 07a41e94667f4a947a05e00cbd5040a15931b8b3..59fab47fc8ed2d5c66b76d7f3bab373a7f87687f 100644 |
--- a/gm/perspshaders.cpp |
+++ b/gm/perspshaders.cpp |
@@ -23,15 +23,6 @@ static SkImage* make_image(SkCanvas* origCanvas, int w, int h) { |
return surface->newImageSnapshot(); |
} |
-static SkBitmap make_bitmap(int w, int h) { |
- SkBitmap bitmap; |
- bitmap.allocN32Pixels(w, h); |
- SkCanvas canvas(bitmap); |
- |
- sk_tool_utils::draw_checkerboard(&canvas, SK_ColorBLUE, SK_ColorYELLOW, w/10); |
- return bitmap; |
-} |
- |
namespace skiagm { |
class PerspShadersGM : public GM { |
@@ -51,7 +42,9 @@ protected: |
} |
void onOnceBeforeDraw() override { |
- fBitmap = make_bitmap(kCellSize, kCellSize); |
+ fBitmap = sk_tool_utils::create_checkerboard_bitmap(kCellSize, kCellSize, |
+ SK_ColorBLUE, SK_ColorYELLOW, |
+ kCellSize/10); |
fBitmapShader.reset(SkShader::CreateBitmapShader(fBitmap, |
SkShader::kClamp_TileMode, |