Index: samplecode/SampleAvoid.cpp |
diff --git a/samplecode/SampleAvoid.cpp b/samplecode/SampleAvoid.cpp |
index 879481b41c07234d02fe085228b07d0bce2e059d..aa7ca0e8ef4a19d6fa730edcd85b6791387254c7 100644 |
--- a/samplecode/SampleAvoid.cpp |
+++ b/samplecode/SampleAvoid.cpp |
@@ -78,9 +78,9 @@ protected: |
frameP.setStyle(SkPaint::kStroke_Style); |
for (size_t i = 0; i < SK_ARRAY_COUNT(gData); i++) { |
- SkAvoidXfermode mode(SK_ColorGREEN, gData[i].fTolerance, |
- gData[i].fMode); |
- paint.setXfermode(&mode); |
+ SkAutoTUnref<SkAvoidXfermode> mode(SkAvoidXfermode::Create( |
+ SK_ColorGREEN, gData[i].fTolerance, gData[i].fMode)); |
+ paint.setXfermode(mode); |
int div = 3; |
SkRect rr = { 0, 0, r.width()/div, r.height()/div }; |
rr.offset(r.width()/4 - rr.width()/2, r.height()/4 - rr.height()/2); |