Index: bench/SKDBench.h |
diff --git a/bench/SKDBench.h b/bench/SKDBench.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..91d4e8436d669ade012219fdce869cffcf8a38b6 |
--- /dev/null |
+++ b/bench/SKDBench.h |
@@ -0,0 +1,31 @@ |
+/* |
+ * Copyright 2015 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#include "Benchmark.h" |
+#include "SkImageDecoder.h" |
scroggo
2015/02/11 19:38:10
I don't think you need to include SkImageDecoder.h
msarett
2015/02/11 21:57:01
Done.
|
+ |
+/* |
+ * |
+ * This benchmark is designed to test the performance of image decoding. |
+ * It is invoked from the nanobench.cpp file. |
+ * |
+ */ |
+class SKDBench : public Benchmark { |
mtklein
2015/02/11 19:15:36
Let's call it DecodingBench? D is a little vague,
scroggo
2015/02/11 19:38:10
+1
I also think we should remove the existing Dec
msarett
2015/02/11 21:57:01
Done.
msarett
2015/02/11 21:57:01
Done.
|
+public: |
+ SKDBench(const char* name, SkString path, SkColorType colorType); |
scroggo
2015/02/11 19:38:10
What is "name"? It looks like we always use "SKD"?
msarett
2015/02/11 21:57:01
Done.
|
+ |
+protected: |
+ const char* onGetName() SK_OVERRIDE; |
+ bool isSuitableFor(Backend backend) SK_OVERRIDE; |
+ void onDraw(const int n, SkCanvas* canvas) SK_OVERRIDE; |
+ |
+private: |
+ SkString fName; |
+ SkString fPath; |
+ SkColorType fColorType; |
+ typedef Benchmark INHERITED; |
+}; |