Index: src/core/SkImageFilter.cpp |
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp |
index e999d3aebb3ef885b0ea82926a11eb7319c76190..06076c6891101e4f6c4cd71b94fb40ab61f0e3c8 100644 |
--- a/src/core/SkImageFilter.cpp |
+++ b/src/core/SkImageFilter.cpp |
@@ -158,22 +158,6 @@ |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
-SkImageFilter::SkImageFilter(sk_sp<SkImageFilter>* inputs, |
- int inputCount, |
- const CropRect* cropRect) |
- : fInputCount(inputCount), |
- fInputs(new SkImageFilter*[inputCount]), |
- fUsesSrcInput(false), |
- fCropRect(cropRect ? *cropRect : CropRect(SkRect(), 0x0)), |
- fUniqueID(next_image_filter_unique_id()) { |
- for (int i = 0; i < inputCount; ++i) { |
- if (nullptr == inputs[i] || inputs[i]->usesSrcInput()) { |
- fUsesSrcInput = true; |
- } |
- fInputs[i] = SkSafeRef(inputs[i].get()); |
- } |
-} |
- |
SkImageFilter::SkImageFilter(int inputCount, SkImageFilter** inputs, const CropRect* cropRect) |
: fInputCount(inputCount), |
fInputs(new SkImageFilter*[inputCount]), |
@@ -184,7 +168,8 @@ |
if (nullptr == inputs[i] || inputs[i]->usesSrcInput()) { |
fUsesSrcInput = true; |
} |
- fInputs[i] = SkSafeRef(inputs[i]); |
+ fInputs[i] = inputs[i]; |
+ SkSafeRef(fInputs[i]); |
} |
} |
@@ -571,12 +556,11 @@ |
return SkMatrixImageFilter::Create(matrix, filterQuality, input); |
} |
-sk_sp<SkImageFilter> SkImageFilter::makeWithLocalMatrix(const SkMatrix& matrix) const { |
+SkImageFilter* SkImageFilter::newWithLocalMatrix(const SkMatrix& matrix) const { |
// SkLocalMatrixImageFilter takes SkImage* in its factory, but logically that parameter |
// is *always* treated as a const ptr. Hence the const-cast here. |
// |
- SkImageFilter* nonConstThis = const_cast<SkImageFilter*>(this); |
- return SkLocalMatrixImageFilter::Make(matrix, sk_ref_sp<SkImageFilter>(nonConstThis)); |
+ return SkLocalMatrixImageFilter::Create(matrix, const_cast<SkImageFilter*>(this)); |
} |
sk_sp<SkSpecialImage> SkImageFilter::filterInput(int index, |