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

Unified Diff: src/effects/SkLumaColorFilter.cpp

Issue 1182813002: Don't leak fragment processor in SkColorFilter::asFragmentProcessors implementations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « src/effects/SkColorMatrixFilter.cpp ('k') | src/effects/SkTableColorFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkLumaColorFilter.cpp
diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp
index 00005417be678433f38b5f8c83695e0ee02d5bb0..13bb6cbd9ea5f778b1c8733e57ff2a52b5a9e6b6 100644
--- a/src/effects/SkLumaColorFilter.cpp
+++ b/src/effects/SkLumaColorFilter.cpp
@@ -126,6 +126,9 @@ bool SkLumaColorFilter::asFragmentProcessors(GrContext*,
if (frag) {
if (array) {
*array->append() = frag;
+ } else {
+ frag->unref();
+ SkDEBUGCODE(frag = NULL;)
Noel Gordon 2015/06/12 17:51:00 That wink at <eol> is interesting ;)
}
return true;
}
« no previous file with comments | « src/effects/SkColorMatrixFilter.cpp ('k') | src/effects/SkTableColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698