OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "CopyTilesRenderer.h" | 8 #include "CopyTilesRenderer.h" |
9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
10 #include "SkDevice.h" | 10 #include "SkDevice.h" |
11 #include "SkFlags.h" | 11 #include "SkCommandLineFlags.h" |
12 #include "SkGraphics.h" | 12 #include "SkGraphics.h" |
13 #include "SkImageDecoder.h" | 13 #include "SkImageDecoder.h" |
14 #include "SkImageEncoder.h" | 14 #include "SkImageEncoder.h" |
15 #include "SkMath.h" | 15 #include "SkMath.h" |
16 #include "SkOSFile.h" | 16 #include "SkOSFile.h" |
17 #include "SkPicture.h" | 17 #include "SkPicture.h" |
18 #include "SkStream.h" | 18 #include "SkStream.h" |
19 #include "SkString.h" | 19 #include "SkString.h" |
20 #include "PictureRenderer.h" | 20 #include "PictureRenderer.h" |
21 #include "PictureRenderingFlags.h" | 21 #include "PictureRenderingFlags.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 } else { | 267 } else { |
268 SkString warning; | 268 SkString warning; |
269 warning.printf("Warning: skipping %s\n", input); | 269 warning.printf("Warning: skipping %s\n", input); |
270 SkDebugf(warning.c_str()); | 270 SkDebugf(warning.c_str()); |
271 } | 271 } |
272 return failures; | 272 return failures; |
273 } | 273 } |
274 | 274 |
275 int tool_main(int argc, char** argv); | 275 int tool_main(int argc, char** argv); |
276 int tool_main(int argc, char** argv) { | 276 int tool_main(int argc, char** argv) { |
277 SkFlags::SetUsage("Render .skp files."); | 277 SkCommandLineFlags::SetUsage("Render .skp files."); |
278 SkFlags::ParseCommandLine(argc, argv); | 278 SkCommandLineFlags::Parse(argc, argv); |
279 | 279 |
280 if (FLAGS_r.isEmpty()) { | 280 if (FLAGS_r.isEmpty()) { |
281 SkDebugf(".skp files or directories are required.\n"); | 281 SkDebugf(".skp files or directories are required.\n"); |
282 exit(-1); | 282 exit(-1); |
283 } | 283 } |
284 | 284 |
285 if (FLAGS_maxComponentDiff < 0 || FLAGS_maxComponentDiff > 256) { | 285 if (FLAGS_maxComponentDiff < 0 || FLAGS_maxComponentDiff > 256) { |
286 SkDebugf("--maxComponentDiff must be between 0 and 256\n"); | 286 SkDebugf("--maxComponentDiff must be between 0 and 256\n"); |
287 exit(-1); | 287 exit(-1); |
288 } | 288 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 #endif | 333 #endif |
334 #endif | 334 #endif |
335 return 0; | 335 return 0; |
336 } | 336 } |
337 | 337 |
338 #if !defined SK_BUILD_FOR_IOS | 338 #if !defined SK_BUILD_FOR_IOS |
339 int main(int argc, char * const argv[]) { | 339 int main(int argc, char * const argv[]) { |
340 return tool_main(argc, (char**) argv); | 340 return tool_main(argc, (char**) argv); |
341 } | 341 } |
342 #endif | 342 #endif |
OLD | NEW |