| 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 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 sleep(FLAGS_status_sec); | 1274 sleep(FLAGS_status_sec); |
| 1275 #endif | 1275 #endif |
| 1276 } | 1276 } |
| 1277 }); | 1277 }); |
| 1278 thread->start(); | 1278 thread->start(); |
| 1279 return thread; | 1279 return thread; |
| 1280 } | 1280 } |
| 1281 | 1281 |
| 1282 #define PORTABLE_FONT_PREFIX "Toy Liberation " | 1282 #define PORTABLE_FONT_PREFIX "Toy Liberation " |
| 1283 | 1283 |
| 1284 static SkTypeface* create_from_name(const char familyName[], SkTypeface::Style s
tyle) { | 1284 static sk_sp<SkTypeface> create_from_name(const char familyName[], SkTypeface::S
tyle style) { |
| 1285 if (familyName && strlen(familyName) > sizeof(PORTABLE_FONT_PREFIX) | 1285 if (familyName && strlen(familyName) > sizeof(PORTABLE_FONT_PREFIX) |
| 1286 && !strncmp(familyName, PORTABLE_FONT_PREFIX, sizeof(PORTABLE_FONT_P
REFIX) - 1)) { | 1286 && !strncmp(familyName, PORTABLE_FONT_PREFIX, sizeof(PORTABLE_FONT_P
REFIX) - 1)) { |
| 1287 return sk_tool_utils::create_portable_typeface(familyName, style); | 1287 return sk_tool_utils::create_portable_typeface(familyName, style); |
| 1288 } | 1288 } |
| 1289 return nullptr; | 1289 return nullptr; |
| 1290 } | 1290 } |
| 1291 | 1291 |
| 1292 #undef PORTABLE_FONT_PREFIX | 1292 #undef PORTABLE_FONT_PREFIX |
| 1293 | 1293 |
| 1294 extern SkTypeface* (*gCreateTypefaceDelegate)(const char [], SkTypeface::Style )
; | 1294 extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkTypeface::S
tyle ); |
| 1295 | 1295 |
| 1296 int dm_main(); | 1296 int dm_main(); |
| 1297 int dm_main() { | 1297 int dm_main() { |
| 1298 setbuf(stdout, nullptr); | 1298 setbuf(stdout, nullptr); |
| 1299 setup_crash_handler(); | 1299 setup_crash_handler(); |
| 1300 | 1300 |
| 1301 if (FLAGS_verbose) { | 1301 if (FLAGS_verbose) { |
| 1302 gVLog = stderr; | 1302 gVLog = stderr; |
| 1303 } else if (!FLAGS_writePath.isEmpty()) { | 1303 } else if (!FLAGS_writePath.isEmpty()) { |
| 1304 sk_mkdir(FLAGS_writePath[0]); | 1304 sk_mkdir(FLAGS_writePath[0]); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1443 #endif | 1443 #endif |
| 1444 } | 1444 } |
| 1445 } // namespace skiatest | 1445 } // namespace skiatest |
| 1446 | 1446 |
| 1447 #if !defined(SK_BUILD_FOR_IOS) | 1447 #if !defined(SK_BUILD_FOR_IOS) |
| 1448 int main(int argc, char** argv) { | 1448 int main(int argc, char** argv) { |
| 1449 SkCommandLineFlags::Parse(argc, argv); | 1449 SkCommandLineFlags::Parse(argc, argv); |
| 1450 return dm_main(); | 1450 return dm_main(); |
| 1451 } | 1451 } |
| 1452 #endif | 1452 #endif |
| OLD | NEW |