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

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

Issue 1467383003: Move command line print above parse in VisualBench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 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
(...skipping 10 matching lines...) Expand all
21 #include "VisualLightweightBenchModule.h" 21 #include "VisualLightweightBenchModule.h"
22 #include "VisualInteractiveModule.h" 22 #include "VisualInteractiveModule.h"
23 #include "gl/GrGLInterface.h" 23 #include "gl/GrGLInterface.h"
24 24
25 DEFINE_bool2(fullscreen, f, true, "Run fullscreen."); 25 DEFINE_bool2(fullscreen, f, true, "Run fullscreen.");
26 DEFINE_bool2(interactive, n, false, "Run in interactive mode."); 26 DEFINE_bool2(interactive, n, false, "Run in interactive mode.");
27 DEFINE_bool2(dif, d, false, "Use device-independent fonts."); 27 DEFINE_bool2(dif, d, false, "Use device-independent fonts.");
28 28
29 VisualBench::VisualBench(void* hwnd, int argc, char** argv) 29 VisualBench::VisualBench(void* hwnd, int argc, char** argv)
30 : INHERITED(hwnd) { 30 : INHERITED(hwnd) {
31 SkCommandLineFlags::Parse(argc, argv);
32
33 SkDebugf("Command line arguments:"); 31 SkDebugf("Command line arguments:");
34 for (int i = 0; i < argc; ++i) { 32 for (int i = 0; i < argc; ++i) {
35 SkDebugf("%s\n", argv[i]); 33 SkDebugf("%s\n", argv[i]);
36 } 34 }
37 35
36 SkCommandLineFlags::Parse(argc, argv);
37
38 // these have to happen after commandline parsing 38 // these have to happen after commandline parsing
39 if (FLAGS_dif) { 39 if (FLAGS_dif) {
40 const SkSurfaceProps& props(INHERITED::getSurfaceProps()); 40 const SkSurfaceProps& props(INHERITED::getSurfaceProps());
41 uint32_t flags = SkSurfaceProps::kUseDeviceIndependentFonts_Flag | props .flags(); 41 uint32_t flags = SkSurfaceProps::kUseDeviceIndependentFonts_Flag | props .flags();
42 INHERITED::setSurfaceProps(SkSurfaceProps(flags, props.pixelGeometry())) ; 42 INHERITED::setSurfaceProps(SkSurfaceProps(flags, props.pixelGeometry())) ;
43 } 43 }
44 fModule.reset(new VisualLightweightBenchModule(this)); 44 fModule.reset(new VisualLightweightBenchModule(this));
45 if (FLAGS_interactive) { 45 if (FLAGS_interactive) {
46 fModule.reset(new VisualInteractiveModule(this)); 46 fModule.reset(new VisualInteractiveModule(this));
47 } 47 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 171
172 void application_term() { 172 void application_term() {
173 SkEvent::Term(); 173 SkEvent::Term();
174 } 174 }
175 175
176 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { 176 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) {
177 return new VisualBench(hwnd, argc, argv); 177 return new VisualBench(hwnd, argc, argv);
178 } 178 }
179 179
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