Index: gm/avoidxfermode.cpp |
diff --git a/gm/avoidxfermode.cpp b/gm/avoidxfermode.cpp |
index d224b4e2d05d56808b76e9e2d2e700e970215fea..8e8dc2855372343970abc426679e9f0f6019f77e 100644 |
--- a/gm/avoidxfermode.cpp |
+++ b/gm/avoidxfermode.cpp |
@@ -37,9 +37,7 @@ protected: |
// UL corner: replace white with black with a tight tolerance |
SkPaint p1; |
p1.setColor(SK_ColorBLACK); |
- 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); |
@@ -48,9 +46,8 @@ protected: |
// UR corner: draw black everywhere except white with a tight tolerance |
SkPaint p2; |
p2.setColor(SK_ColorBLACK); |
- 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); |
@@ -59,9 +56,7 @@ protected: |
// LL corner: replace red with transparent blue with a loose tolerance |
SkPaint p3; |
p3.setColor(0x7F0000FF); |
- p3.setXfermode(SkAvoidXfermode::Create(SK_ColorRED, |
- 250, |
- SkAvoidXfermode::kTargetColor_Mode))->unref(); |
+ p3.setXfermode(SkAvoidXfermode::Make(SK_ColorRED, 250, SkAvoidXfermode::kTargetColor_Mode)); |
canvas->drawRect(r, p3); |
@@ -70,9 +65,7 @@ protected: |
// LR corner: draw black everywhere except red with a loose tolerance |
SkPaint p4; |
p4.setColor(SK_ColorBLACK); |
- p4.setXfermode(SkAvoidXfermode::Create(SK_ColorRED, |
- 5, |
- SkAvoidXfermode::kAvoidColor_Mode))->unref(); |
+ p4.setXfermode(SkAvoidXfermode::Make(SK_ColorRED, 5, SkAvoidXfermode::kAvoidColor_Mode)); |
canvas->drawRect(r, p4); |
} |