Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: gm/shadertext2.cpp

Issue 255253002: fix bitmap shader leak in gm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/shadertext2.cpp
diff --git a/gm/shadertext2.cpp b/gm/shadertext2.cpp
index e580d91e1e5b59a3aef6e97ce54ac0cdee25fc31..87fe1b29f4ce534e2c223d70e43da60a9bb2d250 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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698