Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Unified Diff: bench/DashBench.cpp

Issue 166583002: Factory methods for heap-allocated SkPathEffect and SkXfermode objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update experimental/PdfViewer Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | experimental/PdfViewer/SkPdfGraphicsState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/DashBench.cpp
diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp
index 2e4bc376bc7d8afa1d65a5efb331c0ea1b5833da..365eee984102af545cbec6ec5d3c4a0de6ac8b70 100644
--- a/bench/DashBench.cpp
+++ b/bench/DashBench.cpp
@@ -71,8 +71,8 @@ protected:
SkPath path;
this->makePath(&path);
- paint.setPathEffect(new SkDashPathEffect(fIntervals.begin(),
- fIntervals.count(), 0))->unref();
+ paint.setPathEffect(SkDashPathEffect::Create(fIntervals.begin(),
+ fIntervals.count(), 0))->unref();
if (fDoClip) {
SkRect r = path.getBounds();
@@ -186,7 +186,7 @@ public:
proc(&fPath);
SkScalar vals[] = { SkIntToScalar(4), SkIntToScalar(4) };
- fPE.reset(new SkDashPathEffect(vals, 2, 0));
+ fPE.reset(SkDashPathEffect::Create(vals, 2, 0));
}
protected:
@@ -224,7 +224,7 @@ public:
fIsRound = isRound;
SkScalar vals[] = { SK_Scalar1, SK_Scalar1 };
- fPE.reset(new SkDashPathEffect(vals, 2, 0));
+ fPE.reset(SkDashPathEffect::Create(vals, 2, 0));
}
protected:
@@ -263,7 +263,7 @@ public:
fDoAA = doAA;
SkScalar vals[] = { SkIntToScalar(dashLength), SkIntToScalar(dashLength) };
- fPathEffect.reset(new SkDashPathEffect(vals, 2, SK_Scalar1, false));
+ fPathEffect.reset(SkDashPathEffect::Create(vals, 2, SK_Scalar1, false));
}
protected:
@@ -323,8 +323,8 @@ public:
// deliberately pick intervals that won't be caught by asPoints(), so
// we can test the filterPath code-path.
const SkScalar intervals[] = { 2, 1, 1, 1 };
- fPathEffect.reset(new SkDashPathEffect(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
« no previous file with comments | « no previous file | experimental/PdfViewer/SkPdfGraphicsState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698