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

Side by Side Diff: tools/VisualBench/VisualBench.cpp

Issue 1340163004: Not correctly initializing VisualBench commandline arguments (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 * 6 *
7 */ 7 */
8 8
9 #include "VisualBench.h" 9 #include "VisualBench.h"
10 10
11 #include "ProcStats.h" 11 #include "ProcStats.h"
12 #include "SkApplication.h" 12 #include "SkApplication.h"
13 #include "SkCanvas.h" 13 #include "SkCanvas.h"
14 #include "SkCommandLineFlags.h" 14 #include "SkCommandLineFlags.h"
15 #include "SkGraphics.h" 15 #include "SkGraphics.h"
16 #include "SkGr.h" 16 #include "SkGr.h"
17 #include "SkOSFile.h" 17 #include "SkOSFile.h"
18 #include "SkStream.h" 18 #include "SkStream.h"
19 #include "Stats.h" 19 #include "Stats.h"
20 #include "VisualLightweightBenchModule.h" 20 #include "VisualLightweightBenchModule.h"
21 #include "VisualInteractiveModule.h" 21 #include "VisualInteractiveModule.h"
22 #include "gl/GrGLInterface.h" 22 #include "gl/GrGLInterface.h"
23 23
24 DEFINE_bool2(fullscreen, f, true, "Run fullscreen."); 24 DEFINE_bool2(fullscreen, f, true, "Run fullscreen.");
25 DEFINE_bool2(interactive, n, false, "Run in interactive mode."); 25 DEFINE_bool2(interactive, n, false, "Run in interactive mode.");
26 26
27 VisualBench::VisualBench(void* hwnd, int argc, char** argv) 27 VisualBench::VisualBench(void* hwnd, int argc, char** argv)
28 : INHERITED(hwnd) 28 : INHERITED(hwnd) {
29 , fModule(new VisualLightweightBenchModule(this)) {
30 SkCommandLineFlags::Parse(argc, argv); 29 SkCommandLineFlags::Parse(argc, argv);
31 30
31 // this has to happen after commandline parsing
32 fModule.reset(new VisualLightweightBenchModule(this));
32 if (FLAGS_interactive) { 33 if (FLAGS_interactive) {
33 fModule.reset(new VisualInteractiveModule(this)); 34 fModule.reset(new VisualInteractiveModule(this));
34 } 35 }
35 36
36 this->setTitle(); 37 this->setTitle();
37 this->setupBackend(); 38 this->setupBackend();
38 } 39 }
39 40
40 VisualBench::~VisualBench() { 41 VisualBench::~VisualBench() {
41 INHERITED::detach(); 42 INHERITED::detach();
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 135 }
135 136
136 void application_term() { 137 void application_term() {
137 SkEvent::Term(); 138 SkEvent::Term();
138 } 139 }
139 140
140 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { 141 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) {
141 return new VisualBench(hwnd, argc, argv); 142 return new VisualBench(hwnd, argc, argv);
142 } 143 }
143 144
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698