| 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" |
| 11 #include "DMSrcSinkAndroid.h" | 11 #include "DMSrcSinkAndroid.h" |
| 12 #include "OverwriteLine.h" | 12 #include "OverwriteLine.h" |
| 13 #include "ProcStats.h" | 13 #include "ProcStats.h" |
| 14 #include "SkBBHFactory.h" | 14 #include "SkBBHFactory.h" |
| 15 #include "SkChecksum.h" | 15 #include "SkChecksum.h" |
| 16 #include "SkCommonFlags.h" | 16 #include "SkCommonFlags.h" |
| 17 #include "SkFontMgr.h" | 17 #include "SkFontMgr.h" |
| 18 #include "SkForceLinking.h" | 18 #include "SkForceLinking.h" |
| 19 #include "SkGraphics.h" | 19 #include "SkGraphics.h" |
| 20 #include "SkInstCnt.h" | |
| 21 #include "SkMD5.h" | 20 #include "SkMD5.h" |
| 22 #include "SkOSFile.h" | 21 #include "SkOSFile.h" |
| 23 #include "SkTHash.h" | 22 #include "SkTHash.h" |
| 24 #include "SkTaskGroup.h" | 23 #include "SkTaskGroup.h" |
| 25 #include "SkThreadUtils.h" | 24 #include "SkThreadUtils.h" |
| 26 #include "Test.h" | 25 #include "Test.h" |
| 27 #include "Timer.h" | 26 #include "Timer.h" |
| 28 #include "sk_tool_utils.h" | 27 #include "sk_tool_utils.h" |
| 29 | 28 |
| 30 DEFINE_string(src, "tests gm skp image", "Source types to test."); | 29 DEFINE_string(src, "tests gm skp image", "Source types to test."); |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 | 743 |
| 745 #undef PORTABLE_FONT_PREFIX | 744 #undef PORTABLE_FONT_PREFIX |
| 746 | 745 |
| 747 extern SkTypeface* (*gCreateTypefaceDelegate)(const char [], SkTypeface::Style )
; | 746 extern SkTypeface* (*gCreateTypefaceDelegate)(const char [], SkTypeface::Style )
; |
| 748 | 747 |
| 749 int dm_main(); | 748 int dm_main(); |
| 750 int dm_main() { | 749 int dm_main() { |
| 751 SetupCrashHandler(); | 750 SetupCrashHandler(); |
| 752 SkAutoGraphics ag; | 751 SkAutoGraphics ag; |
| 753 SkTaskGroup::Enabler enabled(FLAGS_threads); | 752 SkTaskGroup::Enabler enabled(FLAGS_threads); |
| 754 if (FLAGS_leaks) { | |
| 755 SkInstCountPrintLeaksOnExit(); | |
| 756 } | |
| 757 gCreateTypefaceDelegate = &create_from_name; | 753 gCreateTypefaceDelegate = &create_from_name; |
| 758 | 754 |
| 759 start_keepalive(); | 755 start_keepalive(); |
| 760 | 756 |
| 761 gather_gold(); | 757 gather_gold(); |
| 762 gather_uninteresting_hashes(); | 758 gather_uninteresting_hashes(); |
| 763 | 759 |
| 764 gather_srcs(); | 760 gather_srcs(); |
| 765 gather_sinks(); | 761 gather_sinks(); |
| 766 gather_tests(); | 762 gather_tests(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 } | 810 } |
| 815 return 0; | 811 return 0; |
| 816 } | 812 } |
| 817 | 813 |
| 818 #if !defined(SK_BUILD_FOR_IOS) | 814 #if !defined(SK_BUILD_FOR_IOS) |
| 819 int main(int argc, char** argv) { | 815 int main(int argc, char** argv) { |
| 820 SkCommandLineFlags::Parse(argc, argv); | 816 SkCommandLineFlags::Parse(argc, argv); |
| 821 return dm_main(); | 817 return dm_main(); |
| 822 } | 818 } |
| 823 #endif | 819 #endif |
| OLD | NEW |