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

Unified Diff: src/effects/SkArithmeticMode.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/SkArcToPathEffect.cpp ('k') | src/effects/SkAvoidXfermode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkArithmeticMode.cpp
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index b225e6d4c1147a4f726804ec572a6d693799ec31..fbe6358ae4ece2550e28d09f76843da41f87dbca 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -54,13 +54,13 @@ private:
typedef SkXfermode INHERITED;
};
-SkFlattenable* SkArithmeticMode_scalar::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkArithmeticMode_scalar::CreateProc(SkReadBuffer& buffer) {
const SkScalar k1 = buffer.readScalar();
const SkScalar k2 = buffer.readScalar();
const SkScalar k3 = buffer.readScalar();
const SkScalar k4 = buffer.readScalar();
const bool enforcePMColor = buffer.readBool();
- return SkArithmeticMode::Make(k1, k2, k3, k4, enforcePMColor).release();
+ return SkArithmeticMode::Make(k1, k2, k3, k4, enforcePMColor);
}
static int pinToByte(int value) {
« no previous file with comments | « src/effects/SkArcToPathEffect.cpp ('k') | src/effects/SkAvoidXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698