Index: bench/SKPBench.h |
diff --git a/bench/GMBench.h b/bench/SKPBench.h |
similarity index 54% |
copy from bench/GMBench.h |
copy to bench/SKPBench.h |
index 75cee6c0639261f3b0e6e549cf7af9d07dda6409..9cc91928204dbb8d4cf3fe2af502bd19d217356f 100644 |
--- a/bench/GMBench.h |
+++ b/bench/SKPBench.h |
@@ -5,18 +5,19 @@ |
* found in the LICENSE file. |
*/ |
+#ifndef SKPBench_DEFINED |
+#define SKPBench_DEFINED |
+ |
#include "Benchmark.h" |
#include "SkCanvas.h" |
-#include "gm.h" |
+#include "SkPicture.h" |
/** |
- * Runs a GM as a benchmark by repeatedly drawing the GM. |
+ * Runs an SkPicture as a benchmark by repeatedly drawing it scaled inside a device clip. |
*/ |
-class GMBench : public Benchmark { |
+class SKPBench : public Benchmark { |
public: |
- // Constructor takes ownership of the GM param. |
- GMBench(skiagm::GM* gm); |
- virtual ~GMBench(); |
+ SKPBench(const char* name, const SkPicture*, const SkIRect& devClip, SkScalar scale); |
protected: |
virtual const char* onGetName() SK_OVERRIDE; |
@@ -25,7 +26,12 @@ protected: |
virtual SkIPoint onGetSize() SK_OVERRIDE; |
private: |
- skiagm::GM* fGM; |
- SkString fName; |
+ SkAutoTUnref<const SkPicture> fPic; |
+ const SkIRect fClip; |
+ const SkScalar fScale; |
+ SkString fName; |
+ |
typedef Benchmark INHERITED; |
}; |
+ |
+#endif |