From fbfcd5602128ec010c82cb733c9cdc0a3254f9f3 Mon Sep 17 00:00:00 2001 From: "rmistry@google.com" Date: Thu, 23 Aug 2012 18:09:54 +0000 Subject: Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) This CL is part I of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6485054 git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81 --- bench/DashBench.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'bench/DashBench.cpp') diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp index 215581603e..a47aa71cd8 100644 --- a/bench/DashBench.cpp +++ b/bench/DashBench.cpp @@ -50,7 +50,7 @@ public: fWidth = width; fName.printf("dash_%d_%s", width, doClip ? "clipped" : "noclip"); fDoClip = doClip; - + fPts[0].set(SkIntToScalar(10), SkIntToScalar(10)); fPts[1].set(SkIntToScalar(600), SkIntToScalar(10)); } @@ -106,7 +106,7 @@ public: : INHERITED(param, intervals, count, width) { fName.append("_rect"); } - + protected: virtual void handlePath(SkCanvas* canvas, const SkPath& path, const SkPaint& paint, int N) SK_OVERRIDE { @@ -119,14 +119,14 @@ protected: rect.fTop = pts[0].fY - paint.getStrokeWidth() / 2; rect.fRight = rect.fLeft + SkIntToScalar(fWidth); rect.fBottom = rect.fTop + paint.getStrokeWidth(); - + SkPaint p(paint); p.setStyle(SkPaint::kFill_Style); p.setPathEffect(NULL); - + int count = SkScalarRoundToInt((pts[1].fX - pts[0].fX) / (2*fWidth)); SkScalar dx = SkIntToScalar(2 * fWidth); - + for (int i = 0; i < N*10; ++i) { SkRect r = rect; for (int j = 0; j < count; ++j) { @@ -136,7 +136,7 @@ protected: } } } - + private: typedef DashBench INHERITED; }; @@ -144,7 +144,7 @@ private: static void make_unit_star(SkPath* path, int n) { SkScalar rad = -SK_ScalarPI / 2; const SkScalar drad = (n >> 1) * SK_ScalarPI * 2 / n; - + path->moveTo(0, -SK_Scalar1); for (int i = 1; i < n; i++) { rad += drad; @@ -191,7 +191,7 @@ public: MakeDashBench(void* param, void (*proc)(SkPath*), const char name[]) : INHERITED(param) { fName.printf("makedash_%s", name); proc(&fPath); - + SkScalar vals[] = { SkIntToScalar(4), SkIntToScalar(4) }; fPE.reset(new SkDashPathEffect(vals, 2, 0)); } @@ -200,17 +200,17 @@ protected: virtual const char* onGetName() SK_OVERRIDE { return fName.c_str(); } - + virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { SkPath dst; for (int i = 0; i < N; ++i) { SkStrokeRec rec(SkStrokeRec::kHairline_InitStyle); - + fPE->filterPath(&dst, fPath, &rec); dst.rewind(); } } - + private: typedef SkBenchmark INHERITED; }; -- cgit v1.2.3