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 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 | 1258 |
1259 int dm_main(); | 1259 int dm_main(); |
1260 int dm_main() { | 1260 int dm_main() { |
1261 setbuf(stdout, nullptr); | 1261 setbuf(stdout, nullptr); |
1262 setup_crash_handler(); | 1262 setup_crash_handler(); |
1263 | 1263 |
1264 if (FLAGS_verbose) { | 1264 if (FLAGS_verbose) { |
1265 gVLog = stderr; | 1265 gVLog = stderr; |
1266 } else if (!FLAGS_writePath.isEmpty()) { | 1266 } else if (!FLAGS_writePath.isEmpty()) { |
1267 sk_mkdir(FLAGS_writePath[0]); | 1267 sk_mkdir(FLAGS_writePath[0]); |
1268 gVLog = freopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str(
), "w", stderr); | 1268 gVLog = fopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str(),
"w"); |
1269 } | 1269 } |
1270 | 1270 |
1271 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never
missing. | 1271 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never
missing. |
1272 SkAutoGraphics ag; | 1272 SkAutoGraphics ag; |
1273 SkTaskGroup::Enabler enabled(FLAGS_threads); | 1273 SkTaskGroup::Enabler enabled(FLAGS_threads); |
1274 gCreateTypefaceDelegate = &create_from_name; | 1274 gCreateTypefaceDelegate = &create_from_name; |
1275 | 1275 |
1276 { | 1276 { |
1277 SkString testResourcePath = GetResourcePath("color_wheel.png"); | 1277 SkString testResourcePath = GetResourcePath("color_wheel.png"); |
1278 SkFILEStream testResource(testResourcePath.c_str()); | 1278 SkFILEStream testResource(testResourcePath.c_str()); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1408 #endif | 1408 #endif |
1409 } | 1409 } |
1410 } // namespace skiatest | 1410 } // namespace skiatest |
1411 | 1411 |
1412 #if !defined(SK_BUILD_FOR_IOS) | 1412 #if !defined(SK_BUILD_FOR_IOS) |
1413 int main(int argc, char** argv) { | 1413 int main(int argc, char** argv) { |
1414 SkCommandLineFlags::Parse(argc, argv); | 1414 SkCommandLineFlags::Parse(argc, argv); |
1415 return dm_main(); | 1415 return dm_main(); |
1416 } | 1416 } |
1417 #endif | 1417 #endif |
OLD | NEW |