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

Unified Diff: src/effects/SkOffsetImageFilter.cpp

Issue 1855733002: change flattenable factory to return sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/SkMorphologyImageFilter.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 69f1895402fba71f53b930a8ff91e0d80ed5ac37..1df47d8b6f037de0d94f25eeb7446b8a14384ae7 100644
--- a/src/effects/SkOffsetImageFilter.cpp
+++ b/src/effects/SkOffsetImageFilter.cpp
@@ -82,11 +82,11 @@ SkIRect SkOffsetImageFilter::onFilterNodeBounds(const SkIRect& src, const SkMatr
return src.makeOffset(SkScalarCeilToInt(vec.fX), SkScalarCeilToInt(vec.fY));
}
-SkFlattenable* SkOffsetImageFilter::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkOffsetImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
SkPoint offset;
buffer.readPoint(&offset);
- return Make(offset.x(), offset.y(), common.getInput(0), &common.cropRect()).release();
+ return Make(offset.x(), offset.y(), common.getInput(0), &common.cropRect());
}
void SkOffsetImageFilter::flatten(SkWriteBuffer& buffer) const {
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/effects/SkPaintImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698