Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: src/effects/SkOffsetImageFilter.cpp

Issue 1826893002: Switch new SkImageFilter internal methods over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Change method name to drawSpriteWithFilter Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkMergeImageFilter.cpp ('k') | src/effects/SkPaintImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
}
« no previous file with comments | « src/effects/SkMergeImageFilter.cpp ('k') | src/effects/SkPaintImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698