Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Side by Side Diff: dm/DM.cpp

Issue 1974783002: Revert of Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 sleep(FLAGS_status_sec); 1279 sleep(FLAGS_status_sec);
1280 #endif 1280 #endif
1281 } 1281 }
1282 }); 1282 });
1283 thread->start(); 1283 thread->start();
1284 return thread; 1284 return thread;
1285 } 1285 }
1286 1286
1287 #define PORTABLE_FONT_PREFIX "Toy Liberation " 1287 #define PORTABLE_FONT_PREFIX "Toy Liberation "
1288 1288
1289 static sk_sp<SkTypeface> create_from_name(const char familyName[], SkTypeface::S tyle style) { 1289 static SkTypeface* create_from_name(const char familyName[], SkTypeface::Style s tyle) {
1290 if (familyName && strlen(familyName) > sizeof(PORTABLE_FONT_PREFIX) 1290 if (familyName && strlen(familyName) > sizeof(PORTABLE_FONT_PREFIX)
1291 && !strncmp(familyName, PORTABLE_FONT_PREFIX, sizeof(PORTABLE_FONT_P REFIX) - 1)) { 1291 && !strncmp(familyName, PORTABLE_FONT_PREFIX, sizeof(PORTABLE_FONT_P REFIX) - 1)) {
1292 return sk_tool_utils::create_portable_typeface(familyName, style); 1292 return sk_tool_utils::create_portable_typeface(familyName, style);
1293 } 1293 }
1294 return nullptr; 1294 return nullptr;
1295 } 1295 }
1296 1296
1297 #undef PORTABLE_FONT_PREFIX 1297 #undef PORTABLE_FONT_PREFIX
1298 1298
1299 extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkTypeface::S tyle ); 1299 extern SkTypeface* (*gCreateTypefaceDelegate)(const char [], SkTypeface::Style ) ;
1300 1300
1301 int dm_main(); 1301 int dm_main();
1302 int dm_main() { 1302 int dm_main() {
1303 setbuf(stdout, nullptr); 1303 setbuf(stdout, nullptr);
1304 setup_crash_handler(); 1304 setup_crash_handler();
1305 1305
1306 if (FLAGS_verbose) { 1306 if (FLAGS_verbose) {
1307 gVLog = stderr; 1307 gVLog = stderr;
1308 } else if (!FLAGS_writePath.isEmpty()) { 1308 } else if (!FLAGS_writePath.isEmpty()) {
1309 sk_mkdir(FLAGS_writePath[0]); 1309 sk_mkdir(FLAGS_writePath[0]);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 #endif 1450 #endif
1451 } 1451 }
1452 } // namespace skiatest 1452 } // namespace skiatest
1453 1453
1454 #if !defined(SK_BUILD_FOR_IOS) 1454 #if !defined(SK_BUILD_FOR_IOS)
1455 int main(int argc, char** argv) { 1455 int main(int argc, char** argv) {
1456 SkCommandLineFlags::Parse(argc, argv); 1456 SkCommandLineFlags::Parse(argc, argv);
1457 return dm_main(); 1457 return dm_main();
1458 } 1458 }
1459 #endif 1459 #endif
OLDNEW
« no previous file with comments | « bench/TextBlobBench.cpp ('k') | fuzz/FilterFuzz.cpp » ('j') | src/ports/SkFontMgr_android.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698