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

Unified Diff: src/effects/SkColorFilterImageFilter.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/SkBlurImageFilter.cpp ('k') | src/effects/SkComposeImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorFilterImageFilter.cpp
diff --git a/src/effects/SkColorFilterImageFilter.cpp b/src/effects/SkColorFilterImageFilter.cpp
index a93997fabd9eca4d42a8028d533d86ec79e6fee2..1e2cdacb97ef5eab26c8e8089b1ade73856062af 100644
--- a/src/effects/SkColorFilterImageFilter.cpp
+++ b/src/effects/SkColorFilterImageFilter.cpp
@@ -52,10 +52,11 @@ void SkColorFilterImageFilter::flatten(SkWriteBuffer& buffer) const {
buffer.writeFlattenable(fColorFilter.get());
}
-SkSpecialImage* SkColorFilterImageFilter::onFilterImage(SkSpecialImage* source, const Context& ctx,
- SkIPoint* offset) const {
+sk_sp<SkSpecialImage> SkColorFilterImageFilter::onFilterImage(SkSpecialImage* source,
+ const Context& ctx,
+ SkIPoint* offset) const {
SkIPoint inputOffset = SkIPoint::Make(0, 0);
- SkAutoTUnref<SkSpecialImage> input(this->filterInput(0, source, ctx, &inputOffset));
+ sk_sp<SkSpecialImage> input(this->filterInput(0, source, ctx, &inputOffset));
if (!input) {
return nullptr;
}
@@ -91,7 +92,7 @@ SkSpecialImage* SkColorFilterImageFilter::onFilterImage(SkSpecialImage* source,
offset->fX = bounds.fLeft;
offset->fY = bounds.fTop;
- return surf->makeImageSnapshot().release();
+ return surf->makeImageSnapshot();
}
bool SkColorFilterImageFilter::onIsColorFilterNode(SkColorFilter** filter) const {
« no previous file with comments | « src/effects/SkBlurImageFilter.cpp ('k') | src/effects/SkComposeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698