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

Unified Diff: src/effects/SkDropShadowImageFilter.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/SkDisplacementMapEffect.cpp ('k') | src/effects/SkEmbossMaskFilter.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 6e750ca74c1b7f15a522a8527e8c4d0d2ef5ccbf..331cfbd68bfe159993e62d120d071f858e64c5c4 100644
--- a/src/effects/SkDropShadowImageFilter.cpp
+++ b/src/effects/SkDropShadowImageFilter.cpp
@@ -27,7 +27,7 @@ SkDropShadowImageFilter::SkDropShadowImageFilter(SkScalar dx, SkScalar dy,
, fShadowMode(shadowMode) {
}
-SkFlattenable* SkDropShadowImageFilter::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkDropShadowImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
SkScalar dx = buffer.readScalar();
SkScalar dy = buffer.readScalar();
@@ -37,8 +37,8 @@ SkFlattenable* SkDropShadowImageFilter::CreateProc(SkReadBuffer& buffer) {
ShadowMode shadowMode = buffer.isVersionLT(SkReadBuffer::kDropShadowMode_Version) ?
kDrawShadowAndForeground_ShadowMode :
static_cast<ShadowMode>(buffer.readInt());
- return Create(dx, dy, sigmaX, sigmaY, color, shadowMode, common.getInput(0).get(),
- &common.cropRect());
+ return sk_sp<SkFlattenable>(Create(dx, dy, sigmaX, sigmaY, color, shadowMode,
+ common.getInput(0).get(), &common.cropRect()));
}
void SkDropShadowImageFilter::flatten(SkWriteBuffer& buffer) const {
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkEmbossMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698