diff options
-rw-r--r-- | src/effects/SkColorCubeFilter.cpp | 3 | ||||
-rw-r--r-- | src/effects/SkColorFilters.cpp | 3 | ||||
-rw-r--r-- | src/effects/SkColorMatrixFilter.cpp | 3 | ||||
-rw-r--r-- | src/effects/SkLumaColorFilter.cpp | 3 | ||||
-rw-r--r-- | src/effects/SkTableColorFilter.cpp | 3 |
5 files changed, 15 insertions, 0 deletions
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp index 253d287759..8347a9e80f 100644 --- a/src/effects/SkColorCubeFilter.cpp +++ b/src/effects/SkColorCubeFilter.cpp @@ -365,6 +365,9 @@ bool SkColorCubeFilter::asFragmentProcessors(GrContext* context, if (frag) { if (array) { *array->append() = frag; + } else { + frag->unref(); + SkDEBUGCODE(frag = NULL;) } return true; } diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp index 30b550bcc0..1bb9f8fb15 100644 --- a/src/effects/SkColorFilters.cpp +++ b/src/effects/SkColorFilters.cpp @@ -369,6 +369,9 @@ bool SkModeColorFilter::asFragmentProcessors(GrContext*, if (frag) { if (array) { *array->append() = frag; + } else { + frag->unref(); + SkDEBUGCODE(frag = NULL;) } return true; } diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp index 6e9da61e1b..894a7b089d 100644 --- a/src/effects/SkColorMatrixFilter.cpp +++ b/src/effects/SkColorMatrixFilter.cpp @@ -562,6 +562,9 @@ bool SkColorMatrixFilter::asFragmentProcessors(GrContext*, if (frag) { if (array) { *array->append() = frag; + } else { + frag->unref(); + SkDEBUGCODE(frag = NULL;) } return true; } diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp index 00005417be..13bb6cbd9e 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;) } return true; } diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp index 27a5def5e5..839b014c68 100644 --- a/src/effects/SkTableColorFilter.cpp +++ b/src/effects/SkTableColorFilter.cpp @@ -592,6 +592,9 @@ bool SkTable_ColorFilter::asFragmentProcessors(GrContext* context, if (frag) { if (array) { *array->append() = frag; + } else { + frag->unref(); + SkDEBUGCODE(frag = NULL;) } return true; } |