diff options
author | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-30 07:01:03 +0000 |
---|---|---|
committer | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-30 07:01:03 +0000 |
commit | 815211307368b82a8df503432221b80ab0a804c3 (patch) | |
tree | 2bedf70fc78f0790e1c9559710816b92f1ebd0ce /bench | |
parent | 0cb7df97185d5fc8780e225c912e2bc99a26aa8d (diff) |
Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8919 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench')
-rw-r--r-- | bench/MathBench.cpp | 20 | ||||
-rw-r--r-- | bench/PathBench.cpp | 27 |
2 files changed, 23 insertions, 24 deletions
diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp index 24e7ca9448..90cc4b81fe 100644 --- a/bench/MathBench.cpp +++ b/bench/MathBench.cpp @@ -59,12 +59,12 @@ private: class MathBenchU32 : public MathBench { public: MathBenchU32(void* param, const char name[]) : INHERITED(param, name) {} - + protected: virtual void performITest(uint32_t* SK_RESTRICT dst, const uint32_t* SK_RESTRICT src, int count) = 0; - + virtual void performTest(float* SK_RESTRICT dst, const float* SK_RESTRICT src, int count) SK_OVERRIDE { @@ -379,7 +379,7 @@ class CLZBench : public SkBenchmark { uint32_t fData[ARRAY]; bool fUsePortable; -public: +public: CLZBench(void* param, bool usePortable) : INHERITED(param) , fUsePortable(usePortable) { @@ -388,7 +388,7 @@ public: for (int i = 0; i < ARRAY; ++i) { fData[i] = rand.nextU(); } - + if (fUsePortable) { fName = "clz_portable"; } else { @@ -396,14 +396,14 @@ public: } fIsRendering = false; } - + // just so the compiler doesn't remove our loops virtual void process(int) {} - + protected: virtual void onDraw(SkCanvas*) { int accum = 0; - + if (fUsePortable) { for (int j = 0; j < LOOP; ++j) { for (int i = 0; i < ARRAY; ++i) { @@ -420,14 +420,14 @@ protected: } } } - + virtual const char* onGetName() { return fName; } - + private: const char* fName; - + typedef SkBenchmark INHERITED; }; diff --git a/bench/PathBench.cpp b/bench/PathBench.cpp index 6ef78ccdd7..5fe002541a 100644 --- a/bench/PathBench.cpp +++ b/bench/PathBench.cpp @@ -907,19 +907,19 @@ public: fRQ.fPts[2].set(100, 100); fRQ.fW = SkScalarCos(SK_ScalarPI/4); } - + private: virtual const char* onGetName() SK_OVERRIDE { return "ratquad-chop-half"; } - + virtual void onDraw(SkCanvas*) SK_OVERRIDE { SkConic dst[2]; for (int i = 0; i < N; ++i) { fRQ.chop(dst); } } - + typedef SkBenchmark INHERITED; }; @@ -945,14 +945,14 @@ public: } fIsRendering = false; } - + protected: enum { N = 20000, CONICS = 100 }; SkConic fConics[CONICS]; - + private: typedef SkBenchmark INHERITED; }; @@ -960,12 +960,12 @@ private: class ConicBench_ComputeError : public ConicBench { public: ConicBench_ComputeError(void* param) : INHERITED(param) {} - + protected: virtual const char* onGetName() SK_OVERRIDE { return "conic-compute-error"; } - + virtual void onDraw(SkCanvas*) SK_OVERRIDE { SkVector err; for (int i = 0; i < N; ++i) { @@ -974,7 +974,7 @@ protected: } } } - + private: typedef ConicBench INHERITED; }; @@ -982,12 +982,12 @@ private: class ConicBench_asQuadTol : public ConicBench { public: ConicBench_asQuadTol(void* param) : INHERITED(param) {} - + protected: virtual const char* onGetName() SK_OVERRIDE { return "conic-asQuadTol"; } - + virtual void onDraw(SkCanvas*) SK_OVERRIDE { for (int i = 0; i < N; ++i) { for (int j = 0; j < CONICS; ++j) { @@ -995,7 +995,7 @@ protected: } } } - + private: typedef ConicBench INHERITED; }; @@ -1008,7 +1008,7 @@ protected: virtual const char* onGetName() SK_OVERRIDE { return "conic-quadPow2"; } - + virtual void onDraw(SkCanvas*) SK_OVERRIDE { for (int i = 0; i < N; ++i) { for (int j = 0; j < CONICS; ++j) { @@ -1016,7 +1016,7 @@ protected: } } } - + private: typedef ConicBench INHERITED; }; @@ -1083,4 +1083,3 @@ DEF_BENCH( return new ConicBench_ChopHalf(p) ) DEF_BENCH( return new ConicBench_ComputeError(p) ) DEF_BENCH( return new ConicBench_asQuadTol(p) ) DEF_BENCH( return new ConicBench_quadPow2(p) ) - |