Index: gm/shadertext2.cpp |
diff --git a/gm/shadertext2.cpp b/gm/shadertext2.cpp |
index f839161dae395787ba507467ab5b855a43df3330..e580d91e1e5b59a3aef6e97ce54ac0cdee25fc31 100644 |
--- a/gm/shadertext2.cpp |
+++ b/gm/shadertext2.cpp |
@@ -95,14 +95,10 @@ protected: |
makebm(&bmp, kPointSize / 2, kPointSize / 2); |
} |
- SkAutoTUnref<SkShader> shader(SkShader::CreateBitmapShader(bmp, |
- SkShader::kMirror_TileMode, |
- SkShader::kRepeat_TileMode)); |
SkPaint fillPaint; |
fillPaint.setAntiAlias(true); |
fillPaint.setTextSize(SkIntToScalar(kPointSize)); |
fillPaint.setFilterLevel(SkPaint::kLow_FilterLevel); |
- fillPaint.setShader(shader); |
SkPaint outlinePaint; |
outlinePaint.setAntiAlias(true); |
@@ -158,7 +154,10 @@ protected: |
canvas->translate(0, kPadY / 2 + kPointSize); |
columnH += kPadY / 2 + kPointSize; |
for (int lm = 0; lm < localMatrices.count(); ++lm) { |
- shader->setLocalMatrix(localMatrices[lm].fMatrix); |
+ paint.setShader(SkShader::CreateBitmapShader(bmp, |
+ SkShader::kMirror_TileMode, |
+ SkShader::kRepeat_TileMode, |
+ &localMatrices[lm].fMatrix)); |
canvas->save(); |
canvas->concat(matrices[m].fMatrix); |