caryclark | 5ef194c | 2015-08-31 09:22:38 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
caryclark | 5ef194c | 2015-08-31 09:22:38 -0700 | [diff] [blame] | 8 | #include "SkGraphics.h" |
| 9 | |
caryclark | 5ef194c | 2015-08-31 09:22:38 -0700 | [diff] [blame] | 10 | extern bool CheckChecksums(); |
| 11 | extern bool GenerateChecksums(); |
| 12 | |
Mike Klein | be28ee2 | 2017-02-06 12:46:20 -0500 | [diff] [blame] | 13 | int main(int argc, char** argv) { |
caryclark | 5ef194c | 2015-08-31 09:22:38 -0700 | [diff] [blame] | 14 | if (argc == 2) { |
| 15 | SkAutoGraphics ag; // Enable use of SkRTConfig |
| 16 | if (!strcmp(argv[1], "--check")) { |
| 17 | return (int) !CheckChecksums(); |
| 18 | } |
| 19 | if (!strcmp(argv[1], "--generate")) { |
| 20 | if (!GenerateChecksums()) { |
| 21 | return 2; |
| 22 | } |
| 23 | return 0; |
| 24 | } |
| 25 | } |
| 26 | SkDebugf("Usage:\n %s [--check] [--generate]\n\n", argv[0]); |
| 27 | return 3; |
| 28 | } |