diff options
Diffstat (limited to 'bench/PathUtilsBench.cpp')
-rw-r--r-- | bench/PathUtilsBench.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bench/PathUtilsBench.cpp b/bench/PathUtilsBench.cpp index a53a1f59d2..bf7677b277 100644 --- a/bench/PathUtilsBench.cpp +++ b/bench/PathUtilsBench.cpp @@ -16,14 +16,14 @@ #define STRIDE 2 //this function is redefined for sample, test, and bench. is there anywhere -// I can put it to avoid code duplcation? +// I can put it to avoid code duplcation? static void fillRandomBits( int chars, char* bits ){ SkMWCRandom rand(SkTime::GetMSecs()); for (int i = 0; i < chars; ++i){ bits[i] = rand.nextU(); } -} +} static void path_proc(char* bits, SkPath* path) { SkPathUtils::BitsToPath_Path(path, bits, H, W, STRIDE); @@ -41,14 +41,14 @@ class PathUtilsBench : public SkBenchmark { int fH, fW, fStride; SkString fName; char* bits[H * STRIDE]; - + enum { N = SkBENCHLOOP(20) }; public: PathUtilsBench(void* param, Proc proc, const char name[]) : INHERITED(param) { fProc = proc; fName.printf("pathUtils_%s", name); - + } @@ -60,7 +60,7 @@ protected: for (int i = 0; i < N; ++i){ //create a random 16x16 bitmap fillRandomBits(H * STRIDE, (char*) &bits); - + //use passed function pointer to handle it SkPath path; fProc( (char*) &bits, &path); @@ -71,8 +71,8 @@ private: typedef SkBenchmark INHERITED; }; -static SkBenchmark* PU_path(void* p) { return SkNEW_ARGS(PathUtilsBench, (p, path_proc, "path")); } -static SkBenchmark* PU_region(void* p) { return SkNEW_ARGS(PathUtilsBench, (p, region_proc, "region")); } +static SkBenchmark* PU_path(void* p) { return SkNEW_ARGS(PathUtilsBench, (p, path_proc, "path")); } +static SkBenchmark* PU_region(void* p) { return SkNEW_ARGS(PathUtilsBench, (p, region_proc, "region")); } static BenchRegistry PU_Path(PU_path); static BenchRegistry PU_Region(PU_region); |