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

Side by Side Diff: bench/PerlinNoiseBench.cpp

Issue 23876006: Refactoring: get rid of the SkBenchmark void* parameter. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: sync to head Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « bench/PathUtilsBench.cpp ('k') | bench/PicturePlaybackBench.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "SkBenchmark.h" 7 #include "SkBenchmark.h"
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkPerlinNoiseShader.h" 9 #include "SkPerlinNoiseShader.h"
10 10
11 class PerlinNoiseBench : public SkBenchmark { 11 class PerlinNoiseBench : public SkBenchmark {
12 SkISize fSize; 12 SkISize fSize;
13 13
14 public: 14 public:
15 PerlinNoiseBench(void* param) : INHERITED(param) { 15 PerlinNoiseBench() {
16 fSize = SkISize::Make(80, 80); 16 fSize = SkISize::Make(80, 80);
17 } 17 }
18 18
19 protected: 19 protected:
20 virtual const char* onGetName() SK_OVERRIDE { 20 virtual const char* onGetName() SK_OVERRIDE {
21 return "perlinnoise"; 21 return "perlinnoise";
22 } 22 }
23 23
24 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 24 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
25 this->test(canvas, 0, 0, SkPerlinNoiseShader::kFractalNoise_Type, 25 this->test(canvas, 0, 0, SkPerlinNoiseShader::kFractalNoise_Type,
(...skipping 26 matching lines...) Expand all
52 for (int i = 0; i < this->getLoops(); i++) { 52 for (int i = 0; i < this->getLoops(); i++) {
53 this->drawClippedRect(canvas, x, y, paint); 53 this->drawClippedRect(canvas, x, y, paint);
54 } 54 }
55 } 55 }
56 56
57 typedef SkBenchmark INHERITED; 57 typedef SkBenchmark INHERITED;
58 }; 58 };
59 59
60 /////////////////////////////////////////////////////////////////////////////// 60 ///////////////////////////////////////////////////////////////////////////////
61 61
62 DEF_BENCH( return new PerlinNoiseBench(p); ) 62 DEF_BENCH( return new PerlinNoiseBench(); )
OLDNEW
« no previous file with comments | « bench/PathUtilsBench.cpp ('k') | bench/PicturePlaybackBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698