add options to bench: -repeat N -forceOpaque -forceBlend -forceAA -forceBW
output stats for all configs (should be a option)
git-svn-id: http://skia.googlecode.com/svn/trunk@73 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/bench/SkBenchmark.h b/bench/SkBenchmark.h
index 6256029..00dfb84 100644
--- a/bench/SkBenchmark.h
+++ b/bench/SkBenchmark.h
@@ -5,17 +5,34 @@
#include "SkPoint.h"
class SkCanvas;
+class SkPaint;
class SkBenchmark : public SkRefCnt {
public:
+ SkBenchmark();
+
const char* getName();
SkIPoint getSize();
void draw(SkCanvas*);
+
+ void setForceAlpha(int alpha) {
+ fForceAlpha = alpha;
+ }
+
+ void setForceAA(bool aa) {
+ fForceAA = aa;
+ }
protected:
+ void setupPaint(SkPaint* paint);
+
virtual const char* onGetName() = 0;
virtual SkIPoint onGetSize() = 0;
virtual void onDraw(SkCanvas*) = 0;
+
+private:
+ int fForceAlpha;
+ bool fForceAA;
};
static inline SkIPoint SkMakeIPoint(int x, int y) {