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

Unified Diff: bench/PerlinNoiseBench.cpp

Issue 99893003: Simplify benchmark internal API. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years 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 | « bench/PathUtilsBench.cpp ('k') | bench/PicturePlaybackBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/PerlinNoiseBench.cpp
diff --git a/bench/PerlinNoiseBench.cpp b/bench/PerlinNoiseBench.cpp
index 7cbe5f8c8a2bda6c745894331117c34281440f0f..85b536bcfb77dc6f6201eaefa25318a06ff8d9d7 100644
--- a/bench/PerlinNoiseBench.cpp
+++ b/bench/PerlinNoiseBench.cpp
@@ -21,9 +21,9 @@ protected:
return "perlinnoise";
}
- virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
- this->test(canvas, 0, 0, SkPerlinNoiseShader::kFractalNoise_Type,
- 0.1f, 0.1f, 3, 0, false);
+ virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
+ this->test(loops, canvas, 0, 0, SkPerlinNoiseShader::kFractalNoise_Type,
+ 0.1f, 0.1f, 3, 0, false);
}
private:
@@ -38,7 +38,7 @@ private:
canvas->restore();
}
- void test(SkCanvas* canvas, int x, int y, SkPerlinNoiseShader::Type type,
+ void test(const int loops, SkCanvas* canvas, int x, int y, SkPerlinNoiseShader::Type type,
float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed,
bool stitchTiles) {
SkShader* shader = (type == SkPerlinNoiseShader::kFractalNoise_Type) ?
@@ -49,7 +49,7 @@ private:
SkPaint paint;
paint.setShader(shader)->unref();
- for (int i = 0; i < this->getLoops(); i++) {
+ for (int i = 0; i < loops; i++) {
this->drawClippedRect(canvas, x, y, paint);
}
}
« 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