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 | 7 |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 | 9 |
10 #include "SkCommandLineFlags.h" | 10 #include "SkCommandLineFlags.h" |
11 #include "SkGraphics.h" | 11 #include "SkGraphics.h" |
12 #include "SkPicture.h" | 12 #include "SkPicture.h" |
13 #include "SkRecordOpts.h" | 13 #include "SkRecordOpts.h" |
14 #include "SkRecorder.h" | 14 #include "SkRecorder.h" |
15 #include "SkStream.h" | 15 #include "SkStream.h" |
16 | 16 |
17 #include "DumpRecord.h" | 17 #include "DumpRecord.h" |
18 #include "LazyDecodeBitmap.h" | 18 #include "LazyDecodeBitmap.h" |
19 | 19 |
| 20 #include <stdlib.h> |
| 21 |
20 DEFINE_string2(skps, r, "", ".SKPs to dump."); | 22 DEFINE_string2(skps, r, "", ".SKPs to dump."); |
21 DEFINE_string(match, "", "The usual filters on file names to dump."); | 23 DEFINE_string(match, "", "The usual filters on file names to dump."); |
22 DEFINE_bool2(optimize, O, false, "Run SkRecordOptimize before dumping."); | 24 DEFINE_bool2(optimize, O, false, "Run SkRecordOptimize before dumping."); |
23 DEFINE_int32(tile, 1000000000, "Simulated tile size."); | 25 DEFINE_int32(tile, 1000000000, "Simulated tile size."); |
24 DEFINE_bool(timeWithCommand, false, "If true, print time next to command, else i
n first column."); | 26 DEFINE_bool(timeWithCommand, false, "If true, print time next to command, else i
n first column."); |
25 | 27 |
26 static void dump(const char* name, int w, int h, const SkRecord& record) { | 28 static void dump(const char* name, int w, int h, const SkRecord& record) { |
27 SkBitmap bitmap; | 29 SkBitmap bitmap; |
28 bitmap.allocN32Pixels(w, h); | 30 bitmap.allocN32Pixels(w, h); |
29 SkCanvas canvas(bitmap); | 31 SkCanvas canvas(bitmap); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 } | 74 } |
73 | 75 |
74 return 0; | 76 return 0; |
75 } | 77 } |
76 | 78 |
77 #if !defined SK_BUILD_FOR_IOS | 79 #if !defined SK_BUILD_FOR_IOS |
78 int main(int argc, char * const argv[]) { | 80 int main(int argc, char * const argv[]) { |
79 return tool_main(argc, (char**) argv); | 81 return tool_main(argc, (char**) argv); |
80 } | 82 } |
81 #endif | 83 #endif |
OLD | NEW |