Index: src/effects/SkOffsetImageFilter.cpp |
diff --git a/src/effects/SkOffsetImageFilter.cpp b/src/effects/SkOffsetImageFilter.cpp |
index 8e4b87881d7f535a13d483ccc0c6c33fe4c0a2cc..05df229b3e8b66c963f2cd1a13b7dfb8d8e7d802 100644 |
--- a/src/effects/SkOffsetImageFilter.cpp |
+++ b/src/effects/SkOffsetImageFilter.cpp |
@@ -15,11 +15,11 @@ |
#include "SkSpecialSurface.h" |
#include "SkWriteBuffer.h" |
-SkSpecialImage* SkOffsetImageFilter::onFilterImage(SkSpecialImage* source, |
- const Context& ctx, |
- SkIPoint* offset) const { |
+sk_sp<SkSpecialImage> SkOffsetImageFilter::onFilterImage(SkSpecialImage* source, |
+ const Context& ctx, |
+ SkIPoint* offset) const { |
SkIPoint srcOffset = SkIPoint::Make(0, 0); |
- SkAutoTUnref<SkSpecialImage> input(this->filterInput(0, source, ctx, &srcOffset)); |
+ sk_sp<SkSpecialImage> input(this->filterInput(0, source, ctx, &srcOffset)); |
if (!input) { |
return nullptr; |
} |
@@ -30,7 +30,7 @@ SkSpecialImage* SkOffsetImageFilter::onFilterImage(SkSpecialImage* source, |
if (!this->cropRectIsSet()) { |
offset->fX = srcOffset.fX + SkScalarRoundToInt(vec.fX); |
offset->fY = srcOffset.fY + SkScalarRoundToInt(vec.fY); |
- return input.release(); |
+ return input; |
} else { |
SkIRect bounds; |
SkIRect srcBounds = SkIRect::MakeWH(input->width(), input->height()); |
@@ -61,7 +61,7 @@ SkSpecialImage* SkOffsetImageFilter::onFilterImage(SkSpecialImage* source, |
offset->fX = bounds.fLeft; |
offset->fY = bounds.fTop; |
- return surf->makeImageSnapshot().release(); |
+ return surf->makeImageSnapshot(); |
} |
} |