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

Unified Diff: bench/DeferredCanvasBench.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/DecodeBench.cpp ('k') | bench/DeferredSurfaceCopyBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/DeferredCanvasBench.cpp
diff --git a/bench/DeferredCanvasBench.cpp b/bench/DeferredCanvasBench.cpp
index e14bb24cf8c640700781a9cc83a22cc2a76b490b..4caf2299fce5961875abeb9b8dd5b0b6616c4171 100644
--- a/bench/DeferredCanvasBench.cpp
+++ b/bench/DeferredCanvasBench.cpp
@@ -16,7 +16,6 @@ public:
}
enum {
- N = SkBENCHLOOP(25), // number of times to create the picture
CANVAS_WIDTH = 200,
CANVAS_HEIGHT = 200,
};
@@ -34,7 +33,7 @@ protected:
initDeferredCanvas(deferredCanvas);
- for (int i = 0; i < N; i++) {
+ for (int i = 0; i < this->getLoops(); i++) {
drawInDeferredCanvas(deferredCanvas);
}
@@ -75,9 +74,6 @@ public:
: INHERITED(param, "record") {
}
- enum {
- M = SkBENCHLOOP(700), // number of individual draws in each loop
- };
protected:
virtual void initDeferredCanvas(SkDeferredCanvas* canvas) SK_OVERRIDE {
@@ -88,7 +84,7 @@ protected:
SkRect rect;
rect.setXYWH(0, 0, 10, 10);
SkPaint paint;
- for (int i = 0; i < M; i++) {
+ for (int i = 0; i < this->getLoops(); i++) {
canvas->save(SkCanvas::kMatrixClip_SaveFlag);
canvas->translate(SkIntToScalar(i * 27 % CANVAS_WIDTH), SkIntToScalar(i * 13 % CANVAS_HEIGHT));
canvas->drawRect(rect, paint);
« no previous file with comments | « bench/DecodeBench.cpp ('k') | bench/DeferredSurfaceCopyBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698