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

Unified Diff: src/core/SkModeColorFilter.cpp

Issue 1821103004: Revert of Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (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/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 3da51609a3a4dbadaef747332fe19d8f75ab9a10..1e104d8dc77856b7ba07940769836e9a0e444025 100644
--- a/src/core/SkModeColorFilter.cpp
+++ b/src/core/SkModeColorFilter.cpp
@@ -80,7 +80,7 @@
SkFlattenable* SkModeColorFilter::CreateProc(SkReadBuffer& buffer) {
SkColor color = buffer.readColor();
SkXfermode::Mode mode = (SkXfermode::Mode)buffer.readUInt();
- return SkColorFilter::MakeModeFilter(color, mode).release();
+ return SkColorFilter::CreateModeFilter(color, mode);
}
///////////////////////////////////////////////////////////////////////////////
@@ -148,7 +148,7 @@
///////////////////////////////////////////////////////////////////////////////
-sk_sp<SkColorFilter> SkColorFilter::MakeModeFilter(SkColor color, SkXfermode::Mode mode) {
+SkColorFilter* SkColorFilter::CreateModeFilter(SkColor color, SkXfermode::Mode mode) {
if (!SkIsValidMode(mode)) {
return nullptr;
}
@@ -183,10 +183,10 @@
switch (mode) {
case SkXfermode::kSrc_Mode:
- return sk_make_sp<Src_SkModeColorFilter>(color);
+ return new Src_SkModeColorFilter(color);
case SkXfermode::kSrcOver_Mode:
- return sk_make_sp<SrcOver_SkModeColorFilter>(color);
+ return new SrcOver_SkModeColorFilter(color);
default:
- return SkModeColorFilter::Make(color, mode);
+ return SkModeColorFilter::Create(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