OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "CrashHandler.h" | 8 #include "CrashHandler.h" |
9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" |
10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" |
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 } | 1296 } |
1297 | 1297 |
1298 #undef PORTABLE_FONT_PREFIX | 1298 #undef PORTABLE_FONT_PREFIX |
1299 | 1299 |
1300 extern SkTypeface* (*gCreateTypefaceDelegate)(const char [], SkTypeface::Style )
; | 1300 extern SkTypeface* (*gCreateTypefaceDelegate)(const char [], SkTypeface::Style )
; |
1301 | 1301 |
1302 int dm_main(); | 1302 int dm_main(); |
1303 int dm_main() { | 1303 int dm_main() { |
1304 setup_crash_handler(); | 1304 setup_crash_handler(); |
1305 | 1305 |
1306 if (FLAGS_verbose && !FLAGS_writePath.isEmpty()) { | 1306 if (FLAGS_verbose) { |
1307 sk_mkdir(FLAGS_writePath[0]); | 1307 if(!FLAGS_writePath.isEmpty()) { |
1308 gVLog = freopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str(
), "w", stderr); | 1308 sk_mkdir(FLAGS_writePath[0]); |
| 1309 gVLog = freopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_
str(), "w", stderr); |
| 1310 } else { |
| 1311 gVLog = stderr; |
| 1312 } |
1309 } | 1313 } |
1310 | 1314 |
1311 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never
missing. | 1315 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never
missing. |
1312 SkAutoGraphics ag; | 1316 SkAutoGraphics ag; |
1313 SkTaskGroup::Enabler enabled(FLAGS_threads); | 1317 SkTaskGroup::Enabler enabled(FLAGS_threads); |
1314 gCreateTypefaceDelegate = &create_from_name; | 1318 gCreateTypefaceDelegate = &create_from_name; |
1315 | 1319 |
1316 { | 1320 { |
1317 SkString testResourcePath = GetResourcePath("color_wheel.png"); | 1321 SkString testResourcePath = GetResourcePath("color_wheel.png"); |
1318 SkFILEStream testResource(testResourcePath.c_str()); | 1322 SkFILEStream testResource(testResourcePath.c_str()); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1480 Reporter* reporter, | 1484 Reporter* reporter, |
1481 GrContextFactory* fac
tory); | 1485 GrContextFactory* fac
tory); |
1482 } // namespace skiatest | 1486 } // namespace skiatest |
1483 | 1487 |
1484 #if !defined(SK_BUILD_FOR_IOS) | 1488 #if !defined(SK_BUILD_FOR_IOS) |
1485 int main(int argc, char** argv) { | 1489 int main(int argc, char** argv) { |
1486 SkCommandLineFlags::Parse(argc, argv); | 1490 SkCommandLineFlags::Parse(argc, argv); |
1487 return dm_main(); | 1491 return dm_main(); |
1488 } | 1492 } |
1489 #endif | 1493 #endif |
OLD | NEW |