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

Unified Diff: bench/RecordingBench.h

Issue 559153002: Measure picture recording speed in nanobench. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 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
« no previous file with comments | « no previous file | bench/RecordingBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/RecordingBench.h
diff --git a/bench/RecordingBench.h b/bench/RecordingBench.h
new file mode 100644
index 0000000000000000000000000000000000000000..4c0340127c18625983ab3d00bc3ff175793e9bd9
--- /dev/null
+++ b/bench/RecordingBench.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2014 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef RecordingBench_DEFINED
+#define RecordingBench_DEFINED
+
+#include "Benchmark.h"
+#include "SkPicture.h"
+
+class RecordingBench : public Benchmark {
+public:
+ RecordingBench(const char* name, const SkPicture*, bool useBBH);
+
+protected:
+ virtual const char* onGetName() SK_OVERRIDE;
+ virtual bool isSuitableFor(Backend) SK_OVERRIDE;
+ virtual void onDraw(const int loops, SkCanvas*) SK_OVERRIDE;
+ virtual SkIPoint onGetSize() SK_OVERRIDE;
+
+private:
+ SkAutoTUnref<const SkPicture> fSrc;
+ SkString fName;
+ bool fUseBBH;
+
+ typedef Benchmark INHERITED;
+};
+
+#endif//RecordingBench_DEFINED
« no previous file with comments | « no previous file | bench/RecordingBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698