Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkLumaColorFilter.h" | 8 #include "SkLumaColorFilter.h" |
| 9 | 9 |
| 10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 } | 119 } |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 bool SkLumaColorFilter::asFragmentProcessors(GrContext*, | 122 bool SkLumaColorFilter::asFragmentProcessors(GrContext*, |
| 123 SkTDArray<GrFragmentProcessor*>* ar ray) const { | 123 SkTDArray<GrFragmentProcessor*>* ar ray) const { |
| 124 | 124 |
| 125 GrFragmentProcessor* frag = LumaColorFilterEffect::Create(); | 125 GrFragmentProcessor* frag = LumaColorFilterEffect::Create(); |
| 126 if (frag) { | 126 if (frag) { |
| 127 if (array) { | 127 if (array) { |
| 128 *array->append() = frag; | 128 *array->append() = frag; |
| 129 } else { | |
| 130 frag->unref(); | |
| 131 SkDEBUGCODE(frag = NULL;) | |
|
Noel Gordon
2015/06/12 17:51:00
That wink at <eol> is interesting ;)
| |
| 129 } | 132 } |
| 130 return true; | 133 return true; |
| 131 } | 134 } |
| 132 return false; | 135 return false; |
| 133 } | 136 } |
| 134 #endif | 137 #endif |
| OLD | NEW |