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

Unified Diff: tools/VisualBench/VisualDebugModule.h

Issue 1498043002: Create a skeleton VisualDebugModule (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak Created 5 years 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 | « tools/VisualBench/VisualBenchmarkStream.cpp ('k') | tools/VisualBench/VisualDebugModule.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/VisualBench/VisualDebugModule.h
diff --git a/tools/VisualBench/VisualDebugModule.h b/tools/VisualBench/VisualDebugModule.h
new file mode 100644
index 0000000000000000000000000000000000000000..26385c3bb5e917aff73ff5334a5730939124f392
--- /dev/null
+++ b/tools/VisualBench/VisualDebugModule.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef VisualDebugModule_DEFINED
+#define VisualDebugModule_DEFINED
+
+#include "VisualModule.h"
+
+#include "SkDebugCanvas.h"
+#include "VisualBench.h"
+#include "VisualBenchmarkStream.h"
+
+class VisualDebugModule : public VisualModule {
+public:
+ VisualDebugModule(VisualBench* owner);
+ void draw(SkCanvas* canvas) override;
+ bool onHandleChar(SkUnichar unichar) override;
+
+private:
+ enum State {
+ kInit_State,
+ kPlay_State,
+ kNext_State,
+ };
+
+ bool advanceIfNecessary(SkCanvas*);
+
+ State fState;
+ SkAutoTUnref<SkDebugCanvas> fDebugCanvas;
+ int fIndex;
+
+ // support framework
+ VisualBench* fOwner;
+ SkAutoTDelete<VisualBenchmarkStream> fBenchmarkStream;
+
+ typedef VisualModule INHERITED;
+};
+
+#endif
« no previous file with comments | « tools/VisualBench/VisualBenchmarkStream.cpp ('k') | tools/VisualBench/VisualDebugModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698