Index: bench/DashBench.cpp |
diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp |
index e3d8364013a7c1a2da09bd3a8ce3cf43e9dc9679..43db54c0928ca4a0fe1952fbdf83d5b499551fe3 100644 |
--- a/bench/DashBench.cpp |
+++ b/bench/DashBench.cpp |
@@ -72,9 +72,7 @@ protected: |
SkPath path; |
this->makePath(&path); |
- SkAutoTUnref<SkPathEffect> effect(SkDashPathEffect::Create(fIntervals.begin(), |
- fIntervals.count(), 0)); |
- paint.setPathEffect(effect); |
+ paint.setPathEffect(SkDashPathEffect::Make(fIntervals.begin(), fIntervals.count(), 0)); |
if (fDoClip) { |
SkRect r = path.getBounds(); |
@@ -179,7 +177,7 @@ static void make_cubic(SkPath* path) { |
class MakeDashBench : public Benchmark { |
SkString fName; |
SkPath fPath; |
- SkAutoTUnref<SkPathEffect> fPE; |
+ sk_sp<SkPathEffect> fPE; |
public: |
MakeDashBench(void (*proc)(SkPath*), const char name[]) { |
@@ -187,7 +185,7 @@ public: |
proc(&fPath); |
SkScalar vals[] = { SkIntToScalar(4), SkIntToScalar(4) }; |
- fPE.reset(SkDashPathEffect::Create(vals, 2, 0)); |
+ fPE = SkDashPathEffect::Make(vals, 2, 0); |
} |
protected: |
@@ -216,7 +214,7 @@ class DashLineBench : public Benchmark { |
SkString fName; |
SkScalar fStrokeWidth; |
bool fIsRound; |
- SkAutoTUnref<SkPathEffect> fPE; |
+ sk_sp<SkPathEffect> fPE; |
public: |
DashLineBench(SkScalar width, bool isRound) { |
@@ -225,7 +223,7 @@ public: |
fIsRound = isRound; |
SkScalar vals[] = { SK_Scalar1, SK_Scalar1 }; |
- fPE.reset(SkDashPathEffect::Create(vals, 2, 0)); |
+ fPE = SkDashPathEffect::Make(vals, 2, 0); |
} |
protected: |
@@ -254,7 +252,7 @@ class DrawPointsDashingBench : public Benchmark { |
int fStrokeWidth; |
bool fDoAA; |
- SkAutoTUnref<SkPathEffect> fPathEffect; |
+ sk_sp<SkPathEffect> fPathEffect; |
public: |
DrawPointsDashingBench(int dashLength, int strokeWidth, bool doAA) |
@@ -264,7 +262,7 @@ public: |
fDoAA = doAA; |
SkScalar vals[] = { SkIntToScalar(dashLength), SkIntToScalar(dashLength) }; |
- fPathEffect.reset(SkDashPathEffect::Create(vals, 2, SK_Scalar1)); |
+ fPathEffect = SkDashPathEffect::Make(vals, 2, SK_Scalar1); |
} |
protected: |
@@ -301,7 +299,7 @@ class GiantDashBench : public Benchmark { |
SkString fName; |
SkScalar fStrokeWidth; |
SkPoint fPts[2]; |
- SkAutoTUnref<SkPathEffect> fPathEffect; |
+ sk_sp<SkPathEffect> fPathEffect; |
public: |
enum LineType { |
@@ -324,8 +322,7 @@ public: |
// deliberately pick intervals that won't be caught by asPoints(), so |
// we can test the filterPath code-path. |
const SkScalar intervals[] = { 20, 10, 10, 10 }; |
- fPathEffect.reset(SkDashPathEffect::Create(intervals, |
- SK_ARRAY_COUNT(intervals), 0)); |
+ fPathEffect = SkDashPathEffect::Make(intervals, SK_ARRAY_COUNT(intervals), 0); |
SkScalar cx = 640 / 2; // center X |
SkScalar cy = 480 / 2; // center Y |
@@ -381,7 +378,7 @@ class DashGridBench : public Benchmark { |
int fStrokeWidth; |
bool fDoAA; |
- SkAutoTUnref<SkPathEffect> fPathEffect; |
+ sk_sp<SkPathEffect> fPathEffect; |
public: |
DashGridBench(int dashLength, int strokeWidth, bool doAA) { |
@@ -390,7 +387,7 @@ public: |
fDoAA = doAA; |
SkScalar vals[] = { SkIntToScalar(dashLength), SkIntToScalar(dashLength) }; |
- fPathEffect.reset(SkDashPathEffect::Create(vals, 2, SK_Scalar1)); |
+ fPathEffect = SkDashPathEffect::Make(vals, 2, SK_Scalar1); |
} |
protected: |