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

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

Issue 1432983002: Parse command line arguments for sdl + android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | « platform_tools/android/apps/visualbenchsdl/src/main/java/com/skia/VisualBenchActivity.java ('k') | 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 12 matching lines...) Expand all
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); 31 SkCommandLineFlags::Parse(argc, argv);
32 32
33 SkDebugf("Command line arguments:");
34 for (int i = 0; i < argc; ++i) {
35 SkDebugf("%s\n", argv[i]);
36 }
37
33 // these have to happen after commandline parsing 38 // these have to happen after commandline parsing
34 if (FLAGS_dif) { 39 if (FLAGS_dif) {
35 const SkSurfaceProps& props(INHERITED::getSurfaceProps()); 40 const SkSurfaceProps& props(INHERITED::getSurfaceProps());
36 uint32_t flags = SkSurfaceProps::kUseDeviceIndependentFonts_Flag | props .flags(); 41 uint32_t flags = SkSurfaceProps::kUseDeviceIndependentFonts_Flag | props .flags();
37 INHERITED::setSurfaceProps(SkSurfaceProps(flags, props.pixelGeometry())) ; 42 INHERITED::setSurfaceProps(SkSurfaceProps(flags, props.pixelGeometry())) ;
38 } 43 }
39 fModule.reset(new VisualLightweightBenchModule(this)); 44 fModule.reset(new VisualLightweightBenchModule(this));
40 if (FLAGS_interactive) { 45 if (FLAGS_interactive) {
41 fModule.reset(new VisualInteractiveModule(this)); 46 fModule.reset(new VisualInteractiveModule(this));
42 } 47 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 170 }
166 171
167 void application_term() { 172 void application_term() {
168 SkEvent::Term(); 173 SkEvent::Term();
169 } 174 }
170 175
171 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { 176 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) {
172 return new VisualBench(hwnd, argc, argv); 177 return new VisualBench(hwnd, argc, argv);
173 } 178 }
174 179
OLDNEW
« no previous file with comments | « platform_tools/android/apps/visualbenchsdl/src/main/java/com/skia/VisualBenchActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698