diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-29 21:46:59 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-29 21:46:59 +0000 |
commit | bd090452530d2de98e1601de36be9ce3c91d1bdc (patch) | |
tree | 8e923634dbb618361239f7718d1ced74b481811f /gm/shadertext2.cpp | |
parent | fb1dee8b5715988e3a7d2b905178f27eebb19a1c (diff) |
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
Diffstat (limited to 'gm/shadertext2.cpp')
-rw-r--r-- | gm/shadertext2.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gm/shadertext2.cpp b/gm/shadertext2.cpp index e580d91e1e..87fe1b29f4 100644 --- a/gm/shadertext2.cpp +++ b/gm/shadertext2.cpp @@ -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); |