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

Side by Side Diff: tools/flags/SkCommandLineFlags.cpp

Issue 1696763002: Adding a tool to get images from skps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Track unknown images Created 4 years, 10 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 | « tools/flags/SkCommandLineFlags.h ('k') | tools/get_images_from_skps.cpp » ('j') | 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 2013 Google Inc. 2 * Copyright 2013 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 "SkCommandLineFlags.h" 8 #include "SkCommandLineFlags.h"
9 #include "SkTDArray.h" 9 #include "SkTDArray.h"
10 #include "SkTSort.h" 10 #include "SkTSort.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return false; 143 return false;
144 } 144 }
145 145
146 SkFlagInfo* SkCommandLineFlags::gHead; 146 SkFlagInfo* SkCommandLineFlags::gHead;
147 SkString SkCommandLineFlags::gUsage; 147 SkString SkCommandLineFlags::gUsage;
148 148
149 void SkCommandLineFlags::SetUsage(const char* usage) { 149 void SkCommandLineFlags::SetUsage(const char* usage) {
150 gUsage.set(usage); 150 gUsage.set(usage);
151 } 151 }
152 152
153 void SkCommandLineFlags::PrintUsage() {
154 SkDebugf("%s", gUsage.c_str());
155 }
156
153 // Maximum line length for the help message. 157 // Maximum line length for the help message.
154 #define LINE_LENGTH 72 158 #define LINE_LENGTH 72
155 159
156 static void print_indented(const SkString& text) { 160 static void print_indented(const SkString& text) {
157 size_t length = text.size(); 161 size_t length = text.size();
158 const char* currLine = text.c_str(); 162 const char* currLine = text.c_str();
159 const char* stop = currLine + length; 163 const char* stop = currLine + length;
160 while (currLine < stop) { 164 while (currLine < stop) {
161 int lineBreak = SkStrFind(currLine, "\n"); 165 int lineBreak = SkStrFind(currLine, "\n");
162 if (lineBreak < 0) { 166 if (lineBreak < 0) {
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 399 }
396 400
397 } // namespace 401 } // namespace
398 402
399 bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const char* name) { 403 bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const char* name) {
400 return ShouldSkipImpl(strings, name); 404 return ShouldSkipImpl(strings, name);
401 } 405 }
402 bool SkCommandLineFlags::ShouldSkip(const StringArray& strings, const char* name ) { 406 bool SkCommandLineFlags::ShouldSkip(const StringArray& strings, const char* name ) {
403 return ShouldSkipImpl(strings, name); 407 return ShouldSkipImpl(strings, name);
404 } 408 }
OLDNEW
« no previous file with comments | « tools/flags/SkCommandLineFlags.h ('k') | tools/get_images_from_skps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698