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

Unified Diff: src/effects/SkDropShadowImageFilter.cpp

Issue 1861843002: Update DropShadowImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review issues Created 4 years, 8 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/SkDropShadowImageFilter.cpp
diff --git a/src/effects/SkDropShadowImageFilter.cpp b/src/effects/SkDropShadowImageFilter.cpp
index 9cacad5513956f35774460cdfe25f486c0632e3f..92e7e2c096b1bd1525f87930f21b1b8833c6d294 100644
--- a/src/effects/SkDropShadowImageFilter.cpp
+++ b/src/effects/SkDropShadowImageFilter.cpp
@@ -16,9 +16,9 @@
SkDropShadowImageFilter::SkDropShadowImageFilter(SkScalar dx, SkScalar dy,
SkScalar sigmaX, SkScalar sigmaY, SkColor color,
- ShadowMode shadowMode, SkImageFilter* input,
+ ShadowMode shadowMode, sk_sp<SkImageFilter> input,
const CropRect* cropRect)
- : INHERITED(1, &input, cropRect)
+ : INHERITED(&input, 1, cropRect)
, fDx(dx)
, fDy(dy)
, fSigmaX(sigmaX)
@@ -37,8 +37,7 @@ sk_sp<SkFlattenable> SkDropShadowImageFilter::CreateProc(SkReadBuffer& buffer) {
ShadowMode shadowMode = buffer.isVersionLT(SkReadBuffer::kDropShadowMode_Version) ?
kDrawShadowAndForeground_ShadowMode :
static_cast<ShadowMode>(buffer.readInt());
- return sk_sp<SkFlattenable>(Create(dx, dy, sigmaX, sigmaY, color, shadowMode,
- common.getInput(0).get(), &common.cropRect()));
+ return Make(dx, dy, sigmaX, sigmaY, color, shadowMode, common.getInput(0), &common.cropRect());
}
void SkDropShadowImageFilter::flatten(SkWriteBuffer& buffer) const {
« 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