| 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 "SkCommandLineFlags.h" | 8 #include "SkCommandLineFlags.h" |
| 9 #include "SkForceLinking.h" | 9 #include "SkForceLinking.h" |
| 10 #include "SkGraphics.h" | 10 #include "SkGraphics.h" |
| 11 #include "SkOSFile.h" | 11 #include "SkOSFile.h" |
| 12 #include "SkPicture.h" | 12 #include "SkPicture.h" |
| 13 #include "SkQuadTreePicture.h" | 13 #include "SkPictureRecorder.h" |
| 14 #include "SkRecording.h" | 14 #include "SkRecording.h" |
| 15 #include "SkRTreePicture.h" | |
| 16 #include "SkStream.h" | 15 #include "SkStream.h" |
| 17 #include "SkString.h" | 16 #include "SkString.h" |
| 18 #include "SkTileGridPicture.h" | |
| 19 #include "SkTime.h" | 17 #include "SkTime.h" |
| 20 #include "LazyDecodeBitmap.h" | 18 #include "LazyDecodeBitmap.h" |
| 21 | 19 |
| 22 __SK_FORCE_IMAGE_DECODER_LINKING; | 20 __SK_FORCE_IMAGE_DECODER_LINKING; |
| 23 | 21 |
| 24 // Just reading all the SKPs takes about 2 seconds for me, which is the same as
about 100 loops of | 22 // Just reading all the SKPs takes about 2 seconds for me, which is the same as
about 100 loops of |
| 25 // rerecording all the SKPs. So we default to --loops=900, which makes ~90% of
our time spent in | 23 // rerecording all the SKPs. So we default to --loops=900, which makes ~90% of
our time spent in |
| 26 // recording, and this should take ~20 seconds to run. | 24 // recording, and this should take ~20 seconds to run. |
| 27 | 25 |
| 28 DEFINE_string2(skps, r, "skps", "Directory containing SKPs to read and re-record
."); | 26 DEFINE_string2(skps, r, "skps", "Directory containing SKPs to read and re-record
."); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 bench_record(src, filename.c_str(), bbhFactory.get()); | 122 bench_record(src, filename.c_str(), bbhFactory.get()); |
| 125 } | 123 } |
| 126 return failed ? 1 : 0; | 124 return failed ? 1 : 0; |
| 127 } | 125 } |
| 128 | 126 |
| 129 #if !defined SK_BUILD_FOR_IOS | 127 #if !defined SK_BUILD_FOR_IOS |
| 130 int main(int argc, char * const argv[]) { | 128 int main(int argc, char * const argv[]) { |
| 131 return tool_main(argc, (char**) argv); | 129 return tool_main(argc, (char**) argv); |
| 132 } | 130 } |
| 133 #endif | 131 #endif |
| OLD | NEW |