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