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

Unified Diff: bench/SKDBench.h

Issue 918673002: Adding new benchmark to test image decoding performance. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | bench/SKDBench.cpp » ('j') | bench/SKDBench.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+};
« no previous file with comments | « no previous file | bench/SKDBench.cpp » ('j') | bench/SKDBench.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698