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

Unified Diff: gm/avoidxfermode3.cpp

Issue 1832223002: switch xfermodes over 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
Index: gm/avoidxfermode3.cpp
diff --git a/gm/avoidxfermode3.cpp b/gm/avoidxfermode3.cpp
index c88b2a2ab18c54abca5cb0d49a1a18dd79d78d55..a635ae47ac5cc3d3b5be8cd116cc09404e24ea15 100644
--- a/gm/avoidxfermode3.cpp
+++ b/gm/avoidxfermode3.cpp
@@ -38,9 +38,7 @@ protected:
SkPaint p1;
p1.setColor(SK_ColorGREEN);
p1.setAntiAlias(true);
- p1.setXfermode(SkAvoidXfermode::Create(SK_ColorWHITE,
- 5,
- SkAvoidXfermode::kTargetColor_Mode))->unref();
+ p1.setXfermode(SkAvoidXfermode::Make(SK_ColorWHITE, 5, SkAvoidXfermode::kTargetColor_Mode));
canvas->drawRect(r, p1);
@@ -50,9 +48,8 @@ protected:
SkPaint p2;
p2.setColor(SK_ColorRED);
p2.setAntiAlias(true);
- p2.setXfermode(SkAvoidXfermode::Create(SK_ColorWHITE,
- 250,
- SkAvoidXfermode::kAvoidColor_Mode))->unref();
+ p2.setXfermode(SkAvoidXfermode::Make(SK_ColorWHITE, 250,
+ SkAvoidXfermode::kAvoidColor_Mode));
canvas->drawRect(r, p2);
@@ -62,9 +59,8 @@ protected:
SkPaint p3;
p3.setColor(SK_ColorBLUE);
p3.setAntiAlias(true);
- p3.setXfermode(SkAvoidXfermode::Create(SK_ColorWHITE,
- 250,
- SkAvoidXfermode::kTargetColor_Mode))->unref();
+ p3.setXfermode(SkAvoidXfermode::Make(SK_ColorWHITE, 250,
+ SkAvoidXfermode::kTargetColor_Mode));
canvas->drawRect(r, p3);
@@ -74,9 +70,7 @@ protected:
SkPaint p4;
p4.setColor(SK_ColorYELLOW);
p4.setAntiAlias(true);
- p4.setXfermode(SkAvoidXfermode::Create(SK_ColorWHITE,
- 5,
- SkAvoidXfermode::kAvoidColor_Mode))->unref();
+ p4.setXfermode(SkAvoidXfermode::Make(SK_ColorWHITE, 5, SkAvoidXfermode::kAvoidColor_Mode));
canvas->drawRect(r, p4);
}

Powered by Google App Engine
This is Rietveld 408576698