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

Unified Diff: bench/FSRectBench.cpp

Issue 23478013: Major bench refactoring. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: merge with head agani 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/DisplacementBench.cpp ('k') | bench/FontCacheBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/FSRectBench.cpp
diff --git a/bench/FSRectBench.cpp b/bench/FSRectBench.cpp
index 5ae4c2f1db3eea5e6a6482f0a61f002756df6a3c..0083dd4e256a7efe32e4c825efe5dabc08375eea 100644
--- a/bench/FSRectBench.cpp
+++ b/bench/FSRectBench.cpp
@@ -44,9 +44,9 @@ protected:
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
SkPaint paint;
- for (int i = 0; i < N; ++i) {
- paint.setColor(fColors[i]);
- canvas->drawRect(fRects[i], paint);
+ for (int i = 0; i < this->getLoops(); ++i) {
+ paint.setColor(fColors[i % N]);
+ canvas->drawRect(fRects[i % N], paint);
}
}
@@ -54,7 +54,7 @@ private:
enum {
W = 640,
H = 480,
- N = SkBENCHLOOP(300)
+ N = 300,
};
SkRect fRects[N];
SkColor fColors[N];
« no previous file with comments | « bench/DisplacementBench.cpp ('k') | bench/FontCacheBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698