Index: gm/tiledscaledbitmap.cpp |
diff --git a/gm/tiledscaledbitmap.cpp b/gm/tiledscaledbitmap.cpp |
index daecbb05e23ce1d0ac34aada9e66b283b97565dd..d74d40bf49610051605ac3c4a81a74ff0fbb9aeb 100644 |
--- a/gm/tiledscaledbitmap.cpp |
+++ b/gm/tiledscaledbitmap.cpp |
@@ -1,10 +1,10 @@ |
- |
/* |
* Copyright 2014 Google Inc. |
* |
* Use of this source code is governed by a BSD-style license that can be |
* found in the LICENSE file. |
*/ |
+ |
#include "gm.h" |
#include "Resources.h" |
@@ -14,7 +14,6 @@ |
#include "SkShader.h" |
#include "SkStream.h" |
- |
/*** |
* |
* This GM reproduces Skia bug 2904, in which a tiled bitmap shader was failing to draw correctly |
@@ -64,10 +63,8 @@ protected: |
mat.setScale(121.f/360.f, 93.f/288.f); |
mat.postTranslate(-72, -72); |
- SkShader *shader = SkShader::CreateBitmapShader(fBitmap, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &mat); |
- paint.setShader(shader); |
- |
- SkSafeUnref(shader); |
+ paint.setShader(SkShader::MakeBitmapShader(fBitmap, SkShader::kRepeat_TileMode, |
+ SkShader::kRepeat_TileMode, &mat)); |
canvas->drawRectCoords(8,8,1008, 608, paint); |
} |