OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 * Simple tool to generate SKP files for testing. | 7 * Simple tool to generate SKP files for testing. |
8 */ | 8 */ |
9 | 9 |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 if (FLAGS_width <= 0) { | 70 if (FLAGS_width <= 0) { |
71 SkDebugf("--width must be >0\n"); | 71 SkDebugf("--width must be >0\n"); |
72 exit(-1); | 72 exit(-1); |
73 } | 73 } |
74 if (FLAGS_writePath.isEmpty()) { | 74 if (FLAGS_writePath.isEmpty()) { |
75 SkDebugf("--writePath must be nonempty\n"); | 75 SkDebugf("--writePath must be nonempty\n"); |
76 exit(-1); | 76 exit(-1); |
77 } | 77 } |
78 | 78 |
79 SkColor color = SkColorSetRGB(FLAGS_red, FLAGS_green, FLAGS_blue); | 79 SkColor color = SkColorSetRGB(FLAGS_red, FLAGS_green, FLAGS_blue); |
80 make_skp(SkIntToScalar(FLAGS_width), | 80 make_skp(SkIntToScalar(FLAGS_width), |
81 SkIntToScalar(FLAGS_height), | 81 SkIntToScalar(FLAGS_height), |
82 SkIntToScalar(FLAGS_border), | 82 SkIntToScalar(FLAGS_border), |
83 color, FLAGS_writePath[0]); | 83 color, FLAGS_writePath[0]); |
84 return 0; | 84 return 0; |
85 } | 85 } |
86 | 86 |
87 #if !defined SK_BUILD_FOR_IOS | 87 #if !defined SK_BUILD_FOR_IOS |
88 int main(int argc, char * const argv[]) { | 88 int main(int argc, char * const argv[]) { |
89 return tool_main(argc, (char**) argv); | 89 return tool_main(argc, (char**) argv); |
90 } | 90 } |
91 #endif | 91 #endif |
OLD | NEW |