| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 The Android Open Source Project |
| 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 "SkImageFilter.h" | 8 #include "SkImageFilter.h" |
| 9 | 9 |
| 10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| 11 #include "SkFlattenableBuffers.h" | 11 #include "SkFlattenableBuffers.h" |
| 12 #include "SkRect.h" | 12 #include "SkRect.h" |
| 13 #include "SkValidationUtils.h" | 13 #include "SkValidationUtils.h" |
| 14 #if SK_SUPPORT_GPU | 14 #if SK_SUPPORT_GPU |
| 15 #include "GrContext.h" | 15 #include "GrContext.h" |
| 16 #include "GrTexture.h" | 16 #include "GrTexture.h" |
| 17 #include "SkImageFilterUtils.h" | 17 #include "SkImageFilterUtils.h" |
| 18 #endif | 18 #endif |
| 19 | 19 |
| 20 SK_DEFINE_INST_COUNT(SkImageFilter) | |
| 21 | |
| 22 SkImageFilter::SkImageFilter(int inputCount, SkImageFilter** inputs, const CropR
ect* cropRect) | 20 SkImageFilter::SkImageFilter(int inputCount, SkImageFilter** inputs, const CropR
ect* cropRect) |
| 23 : fInputCount(inputCount), | 21 : fInputCount(inputCount), |
| 24 fInputs(new SkImageFilter*[inputCount]), | 22 fInputs(new SkImageFilter*[inputCount]), |
| 25 fCropRect(cropRect ? *cropRect : CropRect(SkRect(), 0x0)) { | 23 fCropRect(cropRect ? *cropRect : CropRect(SkRect(), 0x0)) { |
| 26 for (int i = 0; i < inputCount; ++i) { | 24 for (int i = 0; i < inputCount; ++i) { |
| 27 fInputs[i] = inputs[i]; | 25 fInputs[i] = inputs[i]; |
| 28 SkSafeRef(fInputs[i]); | 26 SkSafeRef(fInputs[i]); |
| 29 } | 27 } |
| 30 } | 28 } |
| 31 | 29 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 return true; | 185 return true; |
| 188 } | 186 } |
| 189 | 187 |
| 190 bool SkImageFilter::asNewEffect(GrEffectRef**, GrTexture*, const SkMatrix&, cons
t SkIRect&) const { | 188 bool SkImageFilter::asNewEffect(GrEffectRef**, GrTexture*, const SkMatrix&, cons
t SkIRect&) const { |
| 191 return false; | 189 return false; |
| 192 } | 190 } |
| 193 | 191 |
| 194 bool SkImageFilter::asColorFilter(SkColorFilter**) const { | 192 bool SkImageFilter::asColorFilter(SkColorFilter**) const { |
| 195 return false; | 193 return false; |
| 196 } | 194 } |
| OLD | NEW |