OLD | NEW |
1 // Main binary for DM. | 1 // Main binary for DM. |
2 // For a high-level overview, please see dm/README. | 2 // For a high-level overview, please see dm/README. |
3 | 3 |
4 #include "SkBenchmark.h" | 4 #include "SkBenchmark.h" |
5 #include "SkCommandLineFlags.h" | 5 #include "SkCommandLineFlags.h" |
6 #include "SkForceLinking.h" | 6 #include "SkForceLinking.h" |
7 #include "SkGraphics.h" | 7 #include "SkGraphics.h" |
8 #include "SkPicture.h" | 8 #include "SkPicture.h" |
9 #include "SkString.h" | 9 #include "SkString.h" |
10 #include "Test.h" | 10 #include "Test.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 int tool_main(int argc, char** argv) { | 223 int tool_main(int argc, char** argv) { |
224 SkAutoGraphics ag; | 224 SkAutoGraphics ag; |
225 SkCommandLineFlags::Parse(argc, argv); | 225 SkCommandLineFlags::Parse(argc, argv); |
226 | 226 |
227 if (FLAGS_dryRun) { | 227 if (FLAGS_dryRun) { |
228 FLAGS_verbose = true; | 228 FLAGS_verbose = true; |
229 } | 229 } |
230 #if SK_ENABLE_INST_COUNT | 230 #if SK_ENABLE_INST_COUNT |
231 gPrintInstCount = FLAGS_leaks; | 231 gPrintInstCount = FLAGS_leaks; |
232 #endif | 232 #endif |
233 GM::SetResourcePath(FLAGS_resources[0]); | |
234 SkBenchmark::SetResourcePath(FLAGS_resources[0]); | |
235 Test::SetResourcePath(FLAGS_resources[0]); | |
236 | 233 |
237 SkTArray<SkString> configs; | 234 SkTArray<SkString> configs; |
238 for (int i = 0; i < FLAGS_config.count(); i++) { | 235 for (int i = 0; i < FLAGS_config.count(); i++) { |
239 SkStrSplit(FLAGS_config[i], ", ", &configs); | 236 SkStrSplit(FLAGS_config[i], ", ", &configs); |
240 } | 237 } |
241 | 238 |
242 SkTDArray<GMRegistry::Factory> gms; | 239 SkTDArray<GMRegistry::Factory> gms; |
243 SkAutoTDelete<DM::Expectations> expectations(SkNEW(DM::NoExpectations)); | 240 SkAutoTDelete<DM::Expectations> expectations(SkNEW(DM::NoExpectations)); |
244 if (FLAGS_gms) { | 241 if (FLAGS_gms) { |
245 append_matching_factories<GM>(GMRegistry::Head(), &gms); | 242 append_matching_factories<GM>(GMRegistry::Head(), &gms); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 reporter.getFailures(&failures); | 279 reporter.getFailures(&failures); |
283 report_failures(failures); | 280 report_failures(failures); |
284 return failures.count() > 0; | 281 return failures.count() > 0; |
285 } | 282 } |
286 | 283 |
287 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 284 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
288 int main(int argc, char** argv) { | 285 int main(int argc, char** argv) { |
289 return tool_main(argc, argv); | 286 return tool_main(argc, argv); |
290 } | 287 } |
291 #endif | 288 #endif |
OLD | NEW |