| 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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 sleep(FLAGS_status_sec); | 1212 sleep(FLAGS_status_sec); |
| 1213 #endif | 1213 #endif |
| 1214 } | 1214 } |
| 1215 }); | 1215 }); |
| 1216 thread->start(); | 1216 thread->start(); |
| 1217 return thread; | 1217 return thread; |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 #define PORTABLE_FONT_PREFIX "Toy Liberation " | 1220 #define PORTABLE_FONT_PREFIX "Toy Liberation " |
| 1221 | 1221 |
| 1222 static sk_sp<SkTypeface> create_from_name(const char familyName[], SkTypeface::S
tyle style) { | 1222 static sk_sp<SkTypeface> create_from_name(const char familyName[], SkFontStyle s
tyle) { |
| 1223 if (familyName && strlen(familyName) > sizeof(PORTABLE_FONT_PREFIX) | 1223 if (familyName && strlen(familyName) > sizeof(PORTABLE_FONT_PREFIX) |
| 1224 && !strncmp(familyName, PORTABLE_FONT_PREFIX, sizeof(PORTABLE_FONT_P
REFIX) - 1)) { | 1224 && !strncmp(familyName, PORTABLE_FONT_PREFIX, sizeof(PORTABLE_FONT_P
REFIX) - 1)) { |
| 1225 return sk_tool_utils::create_portable_typeface(familyName, style); | 1225 return sk_tool_utils::create_portable_typeface(familyName, style); |
| 1226 } | 1226 } |
| 1227 return nullptr; | 1227 return nullptr; |
| 1228 } | 1228 } |
| 1229 | 1229 |
| 1230 #undef PORTABLE_FONT_PREFIX | 1230 #undef PORTABLE_FONT_PREFIX |
| 1231 | 1231 |
| 1232 extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkTypeface::S
tyle ); | 1232 extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkFontStyle )
; |
| 1233 | 1233 |
| 1234 int dm_main(); | 1234 int dm_main(); |
| 1235 int dm_main() { | 1235 int dm_main() { |
| 1236 setbuf(stdout, nullptr); | 1236 setbuf(stdout, nullptr); |
| 1237 setup_crash_handler(); | 1237 setup_crash_handler(); |
| 1238 | 1238 |
| 1239 if (FLAGS_verbose) { | 1239 if (FLAGS_verbose) { |
| 1240 gVLog = stderr; | 1240 gVLog = stderr; |
| 1241 } else if (!FLAGS_writePath.isEmpty()) { | 1241 } else if (!FLAGS_writePath.isEmpty()) { |
| 1242 sk_mkdir(FLAGS_writePath[0]); | 1242 sk_mkdir(FLAGS_writePath[0]); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1383 #endif | 1383 #endif |
| 1384 } | 1384 } |
| 1385 } // namespace skiatest | 1385 } // namespace skiatest |
| 1386 | 1386 |
| 1387 #if !defined(SK_BUILD_FOR_IOS) | 1387 #if !defined(SK_BUILD_FOR_IOS) |
| 1388 int main(int argc, char** argv) { | 1388 int main(int argc, char** argv) { |
| 1389 SkCommandLineFlags::Parse(argc, argv); | 1389 SkCommandLineFlags::Parse(argc, argv); |
| 1390 return dm_main(); | 1390 return dm_main(); |
| 1391 } | 1391 } |
| 1392 #endif | 1392 #endif |
| OLD | NEW |