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

Unified Diff: src/core/SkModeColorFilter.cpp

Issue 1822623002: switch colorfilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/core/SkModeColorFilter.h ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkModeColorFilter.cpp
diff --git a/src/core/SkModeColorFilter.cpp b/src/core/SkModeColorFilter.cpp
index 1e104d8dc77856b7ba07940769836e9a0e444025..3da51609a3a4dbadaef747332fe19d8f75ab9a10 100644
--- a/src/core/SkModeColorFilter.cpp
+++ b/src/core/SkModeColorFilter.cpp
@@ -80,7 +80,7 @@ void SkModeColorFilter::updateCache() {
SkFlattenable* SkModeColorFilter::CreateProc(SkReadBuffer& buffer) {
SkColor color = buffer.readColor();
SkXfermode::Mode mode = (SkXfermode::Mode)buffer.readUInt();
- return SkColorFilter::CreateModeFilter(color, mode);
+ return SkColorFilter::MakeModeFilter(color, mode).release();
}
///////////////////////////////////////////////////////////////////////////////
@@ -148,7 +148,7 @@ private:
///////////////////////////////////////////////////////////////////////////////
-SkColorFilter* SkColorFilter::CreateModeFilter(SkColor color, SkXfermode::Mode mode) {
+sk_sp<SkColorFilter> SkColorFilter::MakeModeFilter(SkColor color, SkXfermode::Mode mode) {
if (!SkIsValidMode(mode)) {
return nullptr;
}
@@ -183,10 +183,10 @@ SkColorFilter* SkColorFilter::CreateModeFilter(SkColor color, SkXfermode::Mode m
switch (mode) {
case SkXfermode::kSrc_Mode:
- return new Src_SkModeColorFilter(color);
+ return sk_make_sp<Src_SkModeColorFilter>(color);
case SkXfermode::kSrcOver_Mode:
- return new SrcOver_SkModeColorFilter(color);
+ return sk_make_sp<SrcOver_SkModeColorFilter>(color);
default:
- return SkModeColorFilter::Create(color, mode);
+ return SkModeColorFilter::Make(color, mode);
}
}
« no previous file with comments | « src/core/SkModeColorFilter.h ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698