fix bitmap shader leak in gm

this was introduced in https://codereview.chromium.org/245963010

this was detected by caryclark@ by examining the result of valgrind on the skia buildbots

BUG=skia:1976
R=caryclark@google.com

Author: dominikg@chromium.org

Review URL: https://codereview.chromium.org/255253002

git-svn-id: http://skia.googlecode.com/svn/trunk@14450 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2014-04-29 21:46:59 +00:00
parent fb1dee8b57
commit bd09045253

View File

@ -154,10 +154,11 @@ protected:
canvas->translate(0, kPadY / 2 + kPointSize);
columnH += kPadY / 2 + kPointSize;
for (int lm = 0; lm < localMatrices.count(); ++lm) {
paint.setShader(SkShader::CreateBitmapShader(bmp,
SkShader::kMirror_TileMode,
SkShader::kRepeat_TileMode,
&localMatrices[lm].fMatrix));
paint.setShader(
SkShader::CreateBitmapShader(bmp,
SkShader::kMirror_TileMode,
SkShader::kRepeat_TileMode,
&localMatrices[lm].fMatrix))->unref();
canvas->save();
canvas->concat(matrices[m].fMatrix);