Chromium Code Reviews| Index: gm/shadertext2.cpp |
| diff --git a/gm/shadertext2.cpp b/gm/shadertext2.cpp |
| index f839161dae395787ba507467ab5b855a43df3330..4bedd77ac7e39890c899e1121a6eaac7778a6d94 100644 |
| --- a/gm/shadertext2.cpp |
| +++ b/gm/shadertext2.cpp |
| @@ -95,6 +95,8 @@ protected: |
| makebm(&bmp, kPointSize / 2, kPointSize / 2); |
| } |
| + // TODO(dominikg): Do we still need to create this shader here? |
| + // The only place where it may be used is in fillPaint.measureText(). |
| SkAutoTUnref<SkShader> shader(SkShader::CreateBitmapShader(bmp, |
| SkShader::kMirror_TileMode, |
| SkShader::kRepeat_TileMode)); |
|
Dominik Grewe
2014/04/25 17:50:15
I think we can delete this shader here. Wdyt?
scroggo
2014/04/25 17:58:32
I agree. I can't imagine measureText needs to look
|
| @@ -158,7 +160,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); |