mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 1 | // Main binary for DM. |
| 2 | // For a high-level overview, please see dm/README. |
| 3 | |
tfarina | f168b86 | 2014-06-19 12:32:29 -0700 | [diff] [blame] | 4 | #include "Benchmark.h" |
| 5 | #include "CrashHandler.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 6 | #include "SkCommandLineFlags.h" |
| 7 | #include "SkForceLinking.h" |
| 8 | #include "SkGraphics.h" |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 9 | #include "SkPicture.h" |
rmistry@google.com | d6bab02 | 2013-12-02 13:50:38 +0000 | [diff] [blame] | 10 | #include "SkString.h" |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 11 | #include "Test.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 12 | #include "gm.h" |
| 13 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 14 | #include "DMBenchTask.h" |
commit-bot@chromium.org | ef57b7e | 2014-02-28 20:31:31 +0000 | [diff] [blame] | 15 | #include "DMCpuGMTask.h" |
| 16 | #include "DMGpuGMTask.h" |
commit-bot@chromium.org | 787227d | 2014-03-26 21:26:15 +0000 | [diff] [blame] | 17 | #include "DMGpuSupport.h" |
mtklein | 30bf3e2 | 2014-06-03 13:57:14 -0700 | [diff] [blame] | 18 | #include "DMPDFTask.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 19 | #include "DMReporter.h" |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 20 | #include "DMSKPTask.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 21 | #include "DMTask.h" |
| 22 | #include "DMTaskRunner.h" |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 23 | #include "DMTestTask.h" |
commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 24 | #include "DMWriteTask.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 25 | |
mtklein | 30bf3e2 | 2014-06-03 13:57:14 -0700 | [diff] [blame] | 26 | #ifdef SK_BUILD_POPPLER |
| 27 | # include "SkPDFRasterizer.h" |
| 28 | # define RASTERIZE_PDF_PROC SkPopplerRasterizePDF |
| 29 | #else |
| 30 | # define RASTERIZE_PDF_PROC NULL |
| 31 | #endif |
| 32 | |
commit-bot@chromium.org | 120c999 | 2014-05-16 18:11:51 +0000 | [diff] [blame] | 33 | #include <ctype.h> |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 34 | |
| 35 | using skiagm::GM; |
| 36 | using skiagm::GMRegistry; |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 37 | using skiatest::Test; |
| 38 | using skiatest::TestRegistry; |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 39 | |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 40 | DEFINE_int32(threads, -1, "Threads for CPU work. Default NUM_CPUS."); |
commit-bot@chromium.org | ef57b7e | 2014-02-28 20:31:31 +0000 | [diff] [blame] | 41 | DEFINE_int32(gpuThreads, 1, "Threads for GPU work."); |
commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 42 | DEFINE_string2(expectations, r, "", |
| 43 | "If a directory, compare generated images against images under this path. " |
commit-bot@chromium.org | 120c999 | 2014-05-16 18:11:51 +0000 | [diff] [blame] | 44 | "If a file, compare generated images against JSON expectations at this path." |
commit-bot@chromium.org | 120c999 | 2014-05-16 18:11:51 +0000 | [diff] [blame] | 45 | ); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 46 | DEFINE_string2(resources, i, "resources", "Path to resources directory."); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 47 | DEFINE_string(match, "", "[~][^]substring[$] [...] of GM name to run.\n" |
| 48 | "Multiple matches may be separated by spaces.\n" |
| 49 | "~ causes a matching GM to always be skipped\n" |
| 50 | "^ requires the start of the GM to match\n" |
| 51 | "$ requires the end of the GM to match\n" |
| 52 | "^ and $ requires an exact match\n" |
| 53 | "If a GM does not match any list entry,\n" |
| 54 | "it is skipped unless some list entry starts with ~"); |
mtklein | 30bf3e2 | 2014-06-03 13:57:14 -0700 | [diff] [blame] | 55 | DEFINE_string(config, "565 8888 pdf gpu nonrendering", |
| 56 | "Options: 565 8888 pdf gpu nonrendering msaa4 msaa16 nvprmsaa4 nvprmsaa16 " |
| 57 | "gpunull gpudebug angle mesa"); |
| 58 | DEFINE_bool(dryRun, false, |
| 59 | "Just print the tests that would be run, without actually running them."); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 60 | DEFINE_bool(leaks, false, "Print leaked instance-counted objects at exit?"); |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 61 | DEFINE_string(skps, "", "Directory to read skps from."); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 62 | |
| 63 | DEFINE_bool(gms, true, "Run GMs?"); |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 64 | DEFINE_bool(benches, true, "Run benches? Does not run GMs-as-benches."); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 65 | DEFINE_bool(tests, true, "Run tests?"); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 66 | |
commit-bot@chromium.org | a65e2fd | 2014-05-30 17:23:31 +0000 | [diff] [blame] | 67 | DECLARE_bool(verbose); |
| 68 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 69 | __SK_FORCE_IMAGE_DECODER_LINKING; |
| 70 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 71 | // "FooBar" -> "foobar". Obviously, ASCII only. |
| 72 | static SkString lowercase(SkString s) { |
| 73 | for (size_t i = 0; i < s.size(); i++) { |
| 74 | s[i] = tolower(s[i]); |
| 75 | } |
| 76 | return s; |
| 77 | } |
| 78 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 79 | static const GrContextFactory::GLContextType native = GrContextFactory::kNative_GLContextType; |
commit-bot@chromium.org | b640186 | 2014-03-12 14:46:31 +0000 | [diff] [blame] | 80 | static const GrContextFactory::GLContextType nvpr = GrContextFactory::kNVPR_GLContextType; |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 81 | static const GrContextFactory::GLContextType null = GrContextFactory::kNull_GLContextType; |
| 82 | static const GrContextFactory::GLContextType debug = GrContextFactory::kDebug_GLContextType; |
| 83 | static const GrContextFactory::GLContextType angle = |
| 84 | #if SK_ANGLE |
| 85 | GrContextFactory::kANGLE_GLContextType; |
| 86 | #else |
| 87 | native; |
| 88 | #endif |
| 89 | static const GrContextFactory::GLContextType mesa = |
| 90 | #if SK_MESA |
bsalomon@google.com | 9dccafa | 2014-05-02 14:43:12 +0000 | [diff] [blame] | 91 | GrContextFactory::kMESA_GLContextType; |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 92 | #else |
| 93 | native; |
| 94 | #endif |
| 95 | |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 96 | static void kick_off_gms(const SkTDArray<GMRegistry::Factory>& gms, |
| 97 | const SkTArray<SkString>& configs, |
| 98 | const DM::Expectations& expectations, |
| 99 | DM::Reporter* reporter, |
| 100 | DM::TaskRunner* tasks) { |
mtklein | e4d3e60 | 2014-06-06 09:28:43 -0700 | [diff] [blame] | 101 | #define START(name, type, ...) \ |
| 102 | if (lowercase(configs[j]).equals(name)) { \ |
| 103 | tasks->add(SkNEW_ARGS(DM::type, (name, reporter, tasks, gms[i], ## __VA_ARGS__))); \ |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 104 | } |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 105 | for (int i = 0; i < gms.count(); i++) { |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 106 | for (int j = 0; j < configs.count(); j++) { |
mtklein | e4d3e60 | 2014-06-06 09:28:43 -0700 | [diff] [blame] | 107 | START("565", CpuGMTask, expectations, kRGB_565_SkColorType); |
| 108 | START("8888", CpuGMTask, expectations, kN32_SkColorType); |
rmistry | 05ead8a | 2014-06-23 06:13:46 -0700 | [diff] [blame] | 109 | START("gpu", GpuGMTask, expectations, native, 0); |
| 110 | START("msaa4", GpuGMTask, expectations, native, 4); |
| 111 | START("msaa16", GpuGMTask, expectations, native, 16); |
| 112 | START("nvprmsaa4", GpuGMTask, expectations, nvpr, 4); |
| 113 | START("nvprmsaa16", GpuGMTask, expectations, nvpr, 16); |
| 114 | START("gpunull", GpuGMTask, expectations, null, 0); |
| 115 | START("gpudebug", GpuGMTask, expectations, debug, 0); |
| 116 | START("angle", GpuGMTask, expectations, angle, 0); |
| 117 | START("mesa", GpuGMTask, expectations, mesa, 0); |
mtklein | 30bf3e2 | 2014-06-03 13:57:14 -0700 | [diff] [blame] | 118 | START("pdf", PDFTask, RASTERIZE_PDF_PROC); |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 119 | } |
| 120 | } |
| 121 | #undef START |
| 122 | } |
| 123 | |
| 124 | static void kick_off_benches(const SkTDArray<BenchRegistry::Factory>& benches, |
| 125 | const SkTArray<SkString>& configs, |
| 126 | DM::Reporter* reporter, |
| 127 | DM::TaskRunner* tasks) { |
| 128 | #define START(name, type, ...) \ |
| 129 | if (lowercase(configs[j]).equals(name)) { \ |
| 130 | tasks->add(SkNEW_ARGS(DM::type, (name, reporter, tasks, benches[i], ## __VA_ARGS__))); \ |
| 131 | } |
| 132 | for (int i = 0; i < benches.count(); i++) { |
| 133 | for (int j = 0; j < configs.count(); j++) { |
| 134 | START("nonrendering", NonRenderingBenchTask); |
| 135 | START("565", CpuBenchTask, kRGB_565_SkColorType); |
commit-bot@chromium.org | 28fcae2 | 2014-04-11 17:15:40 +0000 | [diff] [blame] | 136 | START("8888", CpuBenchTask, kN32_SkColorType); |
rmistry | 05ead8a | 2014-06-23 06:13:46 -0700 | [diff] [blame] | 137 | START("gpu", GpuBenchTask, native, 0); |
| 138 | START("msaa4", GpuBenchTask, native, 4); |
| 139 | START("msaa16", GpuBenchTask, native, 16); |
| 140 | START("nvprmsaa4", GpuBenchTask, nvpr, 4); |
| 141 | START("nvprmsaa16", GpuBenchTask, nvpr, 16); |
| 142 | START("gpunull", GpuBenchTask, null, 0); |
| 143 | START("gpudebug", GpuBenchTask, debug, 0); |
| 144 | START("angle", GpuBenchTask, angle, 0); |
| 145 | START("mesa", GpuBenchTask, mesa, 0); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 146 | } |
| 147 | } |
| 148 | #undef START |
| 149 | } |
| 150 | |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 151 | static void kick_off_tests(const SkTDArray<TestRegistry::Factory>& tests, |
| 152 | DM::Reporter* reporter, |
| 153 | DM::TaskRunner* tasks) { |
| 154 | for (int i = 0; i < tests.count(); i++) { |
commit-bot@chromium.org | ef57b7e | 2014-02-28 20:31:31 +0000 | [diff] [blame] | 155 | SkAutoTDelete<Test> test(tests[i](NULL)); |
| 156 | if (test->isGPUTest()) { |
| 157 | tasks->add(SkNEW_ARGS(DM::GpuTestTask, (reporter, tasks, tests[i]))); |
| 158 | } else { |
| 159 | tasks->add(SkNEW_ARGS(DM::CpuTestTask, (reporter, tasks, tests[i]))); |
| 160 | } |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 161 | } |
| 162 | } |
| 163 | |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 164 | static void kick_off_skps(DM::Reporter* reporter, DM::TaskRunner* tasks) { |
| 165 | if (FLAGS_skps.isEmpty()) { |
| 166 | return; |
| 167 | } |
| 168 | |
| 169 | SkOSFile::Iter it(FLAGS_skps[0], ".skp"); |
| 170 | SkString filename; |
| 171 | while (it.next(&filename)) { |
| 172 | if (SkCommandLineFlags::ShouldSkip(FLAGS_match, filename.c_str())) { |
| 173 | continue; |
| 174 | } |
| 175 | |
| 176 | const SkString path = SkOSPath::SkPathJoin(FLAGS_skps[0], filename.c_str()); |
| 177 | |
| 178 | SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path.c_str())); |
| 179 | if (stream.get() == NULL) { |
| 180 | SkDebugf("Could not read %s.\n", path.c_str()); |
| 181 | exit(1); |
| 182 | } |
| 183 | SkAutoTUnref<SkPicture> pic(SkPicture::CreateFromStream(stream.get())); |
| 184 | if (pic.get() == NULL) { |
| 185 | SkDebugf("Could not read %s as an SkPicture.\n", path.c_str()); |
| 186 | exit(1); |
| 187 | } |
| 188 | |
mtklein | d3e474e | 2014-06-27 12:34:44 -0700 | [diff] [blame^] | 189 | tasks->add(SkNEW_ARGS(DM::SKPTask, (reporter, tasks, pic, filename))); |
| 190 | tasks->add(SkNEW_ARGS(DM::PDFTask, (reporter, tasks, pic, filename, |
mtklein | e4d3e60 | 2014-06-06 09:28:43 -0700 | [diff] [blame] | 191 | RASTERIZE_PDF_PROC))); |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 192 | } |
| 193 | } |
| 194 | |
commit-bot@chromium.org | 39e8d93 | 2014-05-29 20:14:48 +0000 | [diff] [blame] | 195 | static void report_failures(const SkTArray<SkString>& failures) { |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 196 | if (failures.count() == 0) { |
| 197 | return; |
| 198 | } |
| 199 | |
| 200 | SkDebugf("Failures:\n"); |
| 201 | for (int i = 0; i < failures.count(); i++) { |
| 202 | SkDebugf(" %s\n", failures[i].c_str()); |
| 203 | } |
commit-bot@chromium.org | 39e8d93 | 2014-05-29 20:14:48 +0000 | [diff] [blame] | 204 | SkDebugf("%d failures.\n", failures.count()); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 205 | } |
| 206 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 207 | template <typename T, typename Registry> |
| 208 | static void append_matching_factories(Registry* head, SkTDArray<typename Registry::Factory>* out) { |
| 209 | for (const Registry* reg = head; reg != NULL; reg = reg->next()) { |
| 210 | SkAutoTDelete<T> forName(reg->factory()(NULL)); |
| 211 | if (!SkCommandLineFlags::ShouldSkip(FLAGS_match, forName->getName())) { |
| 212 | *out->append() = reg->factory(); |
| 213 | } |
| 214 | } |
| 215 | } |
| 216 | |
commit-bot@chromium.org | 846872f | 2013-10-16 18:21:03 +0000 | [diff] [blame] | 217 | int tool_main(int argc, char** argv); |
| 218 | int tool_main(int argc, char** argv) { |
mtklein | 30e6e2a | 2014-06-18 11:44:15 -0700 | [diff] [blame] | 219 | SetupCrashHandler(); |
commit-bot@chromium.org | 39e8d93 | 2014-05-29 20:14:48 +0000 | [diff] [blame] | 220 | SkAutoGraphics ag; |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 221 | SkCommandLineFlags::Parse(argc, argv); |
commit-bot@chromium.org | a65e2fd | 2014-05-30 17:23:31 +0000 | [diff] [blame] | 222 | |
| 223 | if (FLAGS_dryRun) { |
| 224 | FLAGS_verbose = true; |
| 225 | } |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 226 | #if SK_ENABLE_INST_COUNT |
| 227 | gPrintInstCount = FLAGS_leaks; |
| 228 | #endif |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 229 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 230 | SkTArray<SkString> configs; |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 231 | for (int i = 0; i < FLAGS_config.count(); i++) { |
| 232 | SkStrSplit(FLAGS_config[i], ", ", &configs); |
| 233 | } |
| 234 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 235 | SkTDArray<GMRegistry::Factory> gms; |
commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 236 | SkAutoTDelete<DM::Expectations> expectations(SkNEW(DM::NoExpectations)); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 237 | if (FLAGS_gms) { |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 238 | append_matching_factories<GM>(GMRegistry::Head(), &gms); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 239 | |
| 240 | if (FLAGS_expectations.count() > 0) { |
| 241 | const char* path = FLAGS_expectations[0]; |
| 242 | if (sk_isdir(path)) { |
| 243 | expectations.reset(SkNEW_ARGS(DM::WriteTask::Expectations, (path))); |
| 244 | } else { |
| 245 | expectations.reset(SkNEW_ARGS(DM::JsonExpectations, (path))); |
| 246 | } |
commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 247 | } |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 248 | } |
| 249 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 250 | SkTDArray<BenchRegistry::Factory> benches; |
| 251 | if (FLAGS_benches) { |
tfarina | f168b86 | 2014-06-19 12:32:29 -0700 | [diff] [blame] | 252 | append_matching_factories<Benchmark>(BenchRegistry::Head(), &benches); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 253 | } |
| 254 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 255 | SkTDArray<TestRegistry::Factory> tests; |
| 256 | if (FLAGS_tests) { |
| 257 | append_matching_factories<Test>(TestRegistry::Head(), &tests); |
| 258 | } |
| 259 | |
| 260 | SkDebugf("(%d GMs, %d benches) x %d configs, %d tests\n", |
| 261 | gms.count(), benches.count(), configs.count(), tests.count()); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 262 | DM::Reporter reporter; |
commit-bot@chromium.org | ef57b7e | 2014-02-28 20:31:31 +0000 | [diff] [blame] | 263 | DM::TaskRunner tasks(FLAGS_threads, FLAGS_gpuThreads); |
rmistry | 05ead8a | 2014-06-23 06:13:46 -0700 | [diff] [blame] | 264 | kick_off_gms(gms, configs, *expectations, &reporter, &tasks); |
| 265 | kick_off_benches(benches, configs, &reporter, &tasks); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 266 | kick_off_tests(tests, &reporter, &tasks); |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 267 | kick_off_skps(&reporter, &tasks); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 268 | tasks.wait(); |
| 269 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 270 | SkDebugf("\n"); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 271 | |
commit-bot@chromium.org | 39e8d93 | 2014-05-29 20:14:48 +0000 | [diff] [blame] | 272 | SkTArray<SkString> failures; |
| 273 | reporter.getFailures(&failures); |
| 274 | report_failures(failures); |
| 275 | return failures.count() > 0; |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 276 | } |
commit-bot@chromium.org | 846872f | 2013-10-16 18:21:03 +0000 | [diff] [blame] | 277 | |
| 278 | #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 279 | int main(int argc, char** argv) { |
| 280 | return tool_main(argc, argv); |
| 281 | } |
| 282 | #endif |