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

Unified Diff: tools/VisualBench/VisualBench.cpp

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 | « no previous file | tools/VisualBench/VisualBenchmarkStream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/VisualBench/VisualBench.cpp
diff --git a/tools/VisualBench/VisualBench.cpp b/tools/VisualBench/VisualBench.cpp
index 4b76307f984bfc83e572942cedc2f1766c059e29..476ac1654b9723a49fa494b78853e6532898ba55 100644
--- a/tools/VisualBench/VisualBench.cpp
+++ b/tools/VisualBench/VisualBench.cpp
@@ -18,6 +18,7 @@
#include "SkOSFile.h"
#include "SkStream.h"
#include "Stats.h"
+#include "VisualDebugModule.h"
#include "VisualLightweightBenchModule.h"
#include "VisualInteractiveModule.h"
#include "gl/GrGLInterface.h"
@@ -25,15 +26,16 @@
#include <stdlib.h>
DEFINE_bool2(fullscreen, f, true, "Run fullscreen.");
-DEFINE_bool2(interactive, n, false, "Run in interactive mode.");
+DEFINE_string(mode, "classic", "one of: classic interactive debugger");
DEFINE_bool2(dif, d, false, "Use device-independent fonts.");
VisualBench::VisualBench(void* hwnd, int argc, char** argv)
: INHERITED(hwnd) {
- SkDebugf("Command line arguments:");
- for (int i = 0; i < argc; ++i) {
- SkDebugf("%s\n", argv[i]);
+ SkDebugf("Command line arguments: ");
+ for (int i = 1; i < argc; ++i) {
+ SkDebugf("%s ", argv[i]);
}
+ SkDebugf("\n");
SkCommandLineFlags::Parse(argc, argv);
@@ -49,8 +51,15 @@ VisualBench::VisualBench(void* hwnd, int argc, char** argv)
INHERITED::setSurfaceProps(SkSurfaceProps(flags, props.pixelGeometry()));
}
fModule.reset(new VisualLightweightBenchModule(this));
- if (FLAGS_interactive) {
- fModule.reset(new VisualInteractiveModule(this));
+
+ if (FLAGS_mode.count()) {
+ SkASSERT(FLAGS_mode.count() == 1);
+ SkString mode(FLAGS_mode[0]);
+ if (mode == SkString("interactive")) {
+ fModule.reset(new VisualInteractiveModule(this));
+ } else if (mode == SkString("debugger")) {
+ fModule.reset(new VisualDebugModule(this));
+ }
}
this->setTitle();
« no previous file with comments | « no previous file | tools/VisualBench/VisualBenchmarkStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698