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

Unified Diff: gm/avoidxfermode2.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/avoidxfermode2.cpp
diff --git a/gm/avoidxfermode2.cpp b/gm/avoidxfermode2.cpp
index 039ed4017b15904416b3037a590b42cea0044055..9fe7d3321b42401af13d105083569c14a9c2a52f 100644
--- a/gm/avoidxfermode2.cpp
+++ b/gm/avoidxfermode2.cpp
@@ -35,9 +35,8 @@ protected:
// UL corner: replace the green with a tight tolerance
SkPaint p1;
p1.setColor(SK_ColorRED);
- p1.setXfermode(SkAvoidXfermode::Create(SK_ColorGREEN,
- 55,
- SkAvoidXfermode::kTargetColor_Mode))->unref();
+ p1.setXfermode(SkAvoidXfermode::Make(SK_ColorGREEN, 55,
+ SkAvoidXfermode::kTargetColor_Mode));
canvas->drawRect(r, p1);
@@ -46,9 +45,8 @@ protected:
// UR corner: avoid the green with a tight tolerance
SkPaint p2;
p2.setColor(SK_ColorRED);
- p2.setXfermode(SkAvoidXfermode::Create(SK_ColorGREEN,
- 200,
- SkAvoidXfermode::kAvoidColor_Mode))->unref();
+ p2.setXfermode(SkAvoidXfermode::Make(SK_ColorGREEN, 200,
+ SkAvoidXfermode::kAvoidColor_Mode));
canvas->drawRect(r, p2);
@@ -57,9 +55,8 @@ protected:
// LL corner: replace the green with a loose tolerance
SkPaint p3;
p3.setColor(SK_ColorRED);
- p3.setXfermode(SkAvoidXfermode::Create(SK_ColorGREEN,
- 200,
- SkAvoidXfermode::kTargetColor_Mode))->unref();
+ p3.setXfermode(SkAvoidXfermode::Make(SK_ColorGREEN, 200,
+ SkAvoidXfermode::kTargetColor_Mode));
canvas->drawRect(r, p3);
@@ -68,9 +65,7 @@ protected:
// LR corner: avoid the green with a loose tolerance
SkPaint p4;
p4.setColor(SK_ColorRED);
- p4.setXfermode(SkAvoidXfermode::Create(SK_ColorGREEN,
- 55,
- SkAvoidXfermode::kAvoidColor_Mode))->unref();
+ p4.setXfermode(SkAvoidXfermode::Make(SK_ColorGREEN, 55, SkAvoidXfermode::kAvoidColor_Mode));
canvas->drawRect(r, p4);
}

Powered by Google App Engine
This is Rietveld 408576698