SkPaint::setFoo() refs the foo, leaving the foo with a bonus ref unless you
call ->unref().
Valgrind caught this:
http://108.170.220.120:10117/builders/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/builds/317/steps/RunTests/logs/stdio
BUG=skia:
R=tomhudson@chromium.org, mtklein@google.com, tomhudson@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
377523002
*(bitmap2.getAddr32(0, 0)) = SK_ColorGREEN;
SkShader* shader = SkShader::CreateBitmapShader(bitmap2, SkShader::kClamp_TileMode,
SkShader::kClamp_TileMode);
- paint2.setShader(shader);
+ paint2.setShader(shader)->unref();
REPORTER_ASSERT(r, shader->asABitmap(NULL, NULL, NULL) == SkShader::kDefault_BitmapType);
APPEND(record, SkRecords::DrawRect, paint2, rect);