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

Unified Diff: src/effects/SkComposeImageFilter.cpp

Issue 1841233002: Update SkComposeImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review comments 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 | « samplecode/SampleFilterFuzz.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkComposeImageFilter.cpp
diff --git a/src/effects/SkComposeImageFilter.cpp b/src/effects/SkComposeImageFilter.cpp
index c6722d54585e9e8439bafc06bf0808069667597c..3cd8a9e6fd0716095f7ea971822dcece583eb3a3 100644
--- a/src/effects/SkComposeImageFilter.cpp
+++ b/src/effects/SkComposeImageFilter.cpp
@@ -13,8 +13,8 @@
SkRect SkComposeImageFilter::computeFastBounds(const SkRect& src) const {
- SkImageFilter* outer = getInput(0);
- SkImageFilter* inner = getInput(1);
+ SkImageFilter* outer = this->getInput(0);
+ SkImageFilter* inner = this->getInput(1);
return outer->computeFastBounds(inner->computeFastBounds(src));
}
@@ -26,7 +26,7 @@ sk_sp<SkSpecialImage> SkComposeImageFilter::onFilterImage(SkSpecialImage* source
// filter, so that the inner filter produces the pixels that the outer
// filter requires as input. This matters if the outer filter moves pixels.
SkIRect innerClipBounds;
- innerClipBounds = getInput(0)->filterBounds(ctx.clipBounds(), ctx.ctm());
+ innerClipBounds = this->getInput(0)->filterBounds(ctx.clipBounds(), ctx.ctm());
Context innerContext(ctx.ctm(), innerClipBounds, ctx.cache());
SkIPoint innerOffset = SkIPoint::Make(0, 0);
sk_sp<SkSpecialImage> inner(this->filterInput(1, source, innerContext, &innerOffset));
@@ -60,7 +60,8 @@ SkIRect SkComposeImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix&
SkFlattenable* SkComposeImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 2);
- return SkComposeImageFilter::Create(common.getInput(0), common.getInput(1));
+ return SkComposeImageFilter::Make(sk_ref_sp<SkImageFilter>(common.getInput(0)),
+ sk_ref_sp<SkImageFilter>(common.getInput(1))).release();
}
#ifndef SK_IGNORE_TO_STRING
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698