Index: tests/PictureTest.cpp |
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp |
index 58a08ecc348bf11dfaf9a2cd88c8d792fc5034b4..0ac50d97f99222002c8f344fd49ee4ff4347203c 100644 |
--- a/tests/PictureTest.cpp |
+++ b/tests/PictureTest.cpp |
@@ -144,7 +144,7 @@ |
path.lineTo(50, 50); |
SkScalar intervals[] = { 1.0f, 1.0f }; |
- sk_sp<SkPathEffect> dash(SkDashPathEffect::Make(intervals, 2, 0)); |
+ SkAutoTUnref<SkPathEffect> dash(SkDashPathEffect::Create(intervals, 2, 0)); |
SkPaint paint; |
paint.setStyle(SkPaint::kStroke_Style); |
@@ -233,7 +233,8 @@ |
{ |
SkPaint paint; |
SkScalar intervals [] = { 10, 20 }; |
- paint.setPathEffect(SkDashPathEffect::Make(intervals, 2, 25)); |
+ SkPathEffect* pe = SkDashPathEffect::Create(intervals, 2, 25); |
+ paint.setPathEffect(pe)->unref(); |
SkPoint points [2] = { { 0, 0 }, { 100, 0 } }; |
@@ -249,7 +250,8 @@ |
{ |
SkPaint paint; |
SkScalar intervals [] = { 10, 20 }; |
- paint.setPathEffect(SkDashPathEffect::Make(intervals, 2, 25)); |
+ SkPathEffect* pe = SkDashPathEffect::Create(intervals, 2, 25); |
+ paint.setPathEffect(pe)->unref(); |
for (int i = 0; i < 50; ++i) { |
canvas->drawRect(SkRect::MakeWH(10, 10), paint); |