| OLD | NEW |
| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 flag->setDouble(atof(argv[i])); | 296 flag->setDouble(atof(argv[i])); |
| 297 break; | 297 break; |
| 298 default: | 298 default: |
| 299 SkDEBUGFAIL("Invalid flag type"); | 299 SkDEBUGFAIL("Invalid flag type"); |
| 300 } | 300 } |
| 301 break; | 301 break; |
| 302 } | 302 } |
| 303 flag = flag->next(); | 303 flag = flag->next(); |
| 304 } | 304 } |
| 305 if (!flagMatched) { | 305 if (!flagMatched) { |
| 306 #if SK_BUILD_FOR_MAC |
| 307 if (SkStrStartsWith(argv[i], "NSDocumentRevisions")) { |
| 308 i++; // skip YES |
| 309 } else |
| 310 #endif |
| 306 if (!FLAGS_undefok) { | 311 if (!FLAGS_undefok) { |
| 307 SkDebugf("Got unknown flag \"%s\". Exiting.\n", argv[i]); | 312 SkDebugf("Got unknown flag \"%s\". Exiting.\n", argv[i]); |
| 308 exit(-1); | 313 exit(-1); |
| 309 } | 314 } |
| 310 } | 315 } |
| 311 } | 316 } |
| 312 } | 317 } |
| 313 // Since all of the flags have been set, release the memory used by each | 318 // Since all of the flags have been set, release the memory used by each |
| 314 // flag. FLAGS_x can still be used after this. | 319 // flag. FLAGS_x can still be used after this. |
| 315 SkFlagInfo* flag = gHead; | 320 SkFlagInfo* flag = gHead; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 } | 364 } |
| 360 | 365 |
| 361 } // namespace | 366 } // namespace |
| 362 | 367 |
| 363 bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const
char* name) { | 368 bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const
char* name) { |
| 364 return ShouldSkipImpl(strings, name); | 369 return ShouldSkipImpl(strings, name); |
| 365 } | 370 } |
| 366 bool SkCommandLineFlags::ShouldSkip(const StringArray& strings, const char* name
) { | 371 bool SkCommandLineFlags::ShouldSkip(const StringArray& strings, const char* name
) { |
| 367 return ShouldSkipImpl(strings, name); | 372 return ShouldSkipImpl(strings, name); |
| 368 } | 373 } |
| OLD | NEW |