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

Side by Side Diff: tools/skhello.cpp

Issue 12440067: Change the name of SkFlags to SkCommandLineFlags. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: ParseCommandLine -> Parse Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « tools/render_pictures_main.cpp ('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 2011 Google Inc. 2 * Copyright 2011 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 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkFlags.h" 9 #include "SkCommandLineFlags.h"
10 #include "SkGraphics.h" 10 #include "SkGraphics.h"
11 #include "SkImageEncoder.h" 11 #include "SkImageEncoder.h"
12 #include "SkString.h" 12 #include "SkString.h"
13 13
14 DEFINE_string(o, "skhello.png", "The filename to write the image."); 14 DEFINE_string(o, "skhello.png", "The filename to write the image.");
15 DEFINE_string(t, "Hello", "The string to write."); 15 DEFINE_string(t, "Hello", "The string to write.");
16 16
17 int tool_main(int argc, char** argv); 17 int tool_main(int argc, char** argv);
18 int tool_main(int argc, char** argv) { 18 int tool_main(int argc, char** argv) {
19 SkFlags::SetUsage(""); 19 SkCommandLineFlags::SetUsage("");
20 SkFlags::ParseCommandLine(argc, argv); 20 SkCommandLineFlags::Parse(argc, argv);
21 21
22 SkAutoGraphics ag; 22 SkAutoGraphics ag;
23 SkString path("skhello.png"); 23 SkString path("skhello.png");
24 SkString text("Hello"); 24 SkString text("Hello");
25 25
26 if (!FLAGS_o.isEmpty()) { 26 if (!FLAGS_o.isEmpty()) {
27 path.set(FLAGS_o[0]); 27 path.set(FLAGS_o[0]);
28 } 28 }
29 if (!FLAGS_t.isEmpty()) { 29 if (!FLAGS_t.isEmpty()) {
30 text.set(FLAGS_t[0]); 30 text.set(FLAGS_t[0]);
(...skipping 25 matching lines...) Expand all
56 SkDebugf("--- failed to write %s\n", path.c_str()); 56 SkDebugf("--- failed to write %s\n", path.c_str());
57 } 57 }
58 return !success; 58 return !success;
59 } 59 }
60 60
61 #if !defined SK_BUILD_FOR_IOS 61 #if !defined SK_BUILD_FOR_IOS
62 int main(int argc, char * const argv[]) { 62 int main(int argc, char * const argv[]) {
63 return tool_main(argc, (char**) argv); 63 return tool_main(argc, (char**) argv);
64 } 64 }
65 #endif 65 #endif
OLDNEW
« no previous file with comments | « tools/render_pictures_main.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698