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

Unified Diff: src/effects/SkImageSource.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/SkDropShadowImageFilter.cpp ('k') | src/effects/SkMergeImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkImageSource.cpp
diff --git a/src/effects/SkImageSource.cpp b/src/effects/SkImageSource.cpp
index d63eda989fd2e5a3396af5a17a6871767188eeef..f095df69a8e5458c45187c13b8da8ab59e515e87 100644
--- a/src/effects/SkImageSource.cpp
+++ b/src/effects/SkImageSource.cpp
@@ -65,8 +65,8 @@ void SkImageSource::flatten(SkWriteBuffer& buffer) const {
buffer.writeImage(fImage.get());
}
-SkSpecialImage* SkImageSource::onFilterImage(SkSpecialImage* source, const Context& ctx,
- SkIPoint* offset) const {
+sk_sp<SkSpecialImage> SkImageSource::onFilterImage(SkSpecialImage* source, const Context& ctx,
+ SkIPoint* offset) const {
SkRect dstRect;
ctx.ctm().mapRect(&dstRect, fDstRect);
@@ -76,7 +76,7 @@ SkSpecialImage* SkImageSource::onFilterImage(SkSpecialImage* source, const Conte
offset->fX = offset->fY = 0;
return SkSpecialImage::MakeFromImage(source->internal_getProxy(),
SkIRect::MakeWH(fImage->width(), fImage->height()),
- fImage).release();
+ fImage);
}
const SkIRect dstIRect = dstRect.roundOut();
@@ -110,7 +110,7 @@ SkSpecialImage* SkImageSource::onFilterImage(SkSpecialImage* source, const Conte
offset->fX = dstIRect.fLeft;
offset->fY = dstIRect.fTop;
- return surf->makeImageSnapshot().release();
+ return surf->makeImageSnapshot();
}
SkRect SkImageSource::computeFastBounds(const SkRect& src) const {
« no previous file with comments | « src/effects/SkDropShadowImageFilter.cpp ('k') | src/effects/SkMergeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698