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

Unified Diff: bench/BicubicBench.cpp

Issue 23478013: Major bench refactoring. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: scroggo 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
Index: bench/BicubicBench.cpp
diff --git a/bench/BicubicBench.cpp b/bench/BicubicBench.cpp
index a3a23180f9c7f12740307fdb801f5de8c93a5a7a..ece7cbe503f484a58f01bf48ce9823bea1725869 100644
--- a/bench/BicubicBench.cpp
+++ b/bench/BicubicBench.cpp
@@ -7,7 +7,6 @@
#include "SkBenchmark.h"
#include "SkCanvas.h"
-#include "SkRandom.h"
#include "SkShader.h"
#include "SkString.h"
#include "SkBicubicImageFilter.h"
@@ -37,14 +36,16 @@ protected:
paint.setAntiAlias(true);
- SkRandom rand;
SkRect r = SkRect::MakeWH(40, 40);
SkAutoTUnref<SkImageFilter> bicubic(SkBicubicImageFilter::CreateMitchell(fScale));
paint.setImageFilter(bicubic);
- canvas->save();
- canvas->clipRect(r);
- canvas->drawOval(r, paint);
- canvas->restore();
+
+ for (int i = 0; i < this->getLoops(); i++) {
+ canvas->save();
+ canvas->clipRect(r);
+ canvas->drawOval(r, paint);
+ canvas->restore();
+ }
}
private:

Powered by Google App Engine
This is Rietveld 408576698