| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "OverwriteLine.h" | 9 #include "OverwriteLine.h" |
| 9 #include "SkCommandLineFlags.h" | 10 #include "SkCommandLineFlags.h" |
| 10 #include "SkGraphics.h" | 11 #include "SkGraphics.h" |
| 11 #include "SkOSFile.h" | 12 #include "SkOSFile.h" |
| 12 #include "SkTArray.h" | 13 #include "SkTArray.h" |
| 13 #include "SkTemplates.h" | 14 #include "SkTemplates.h" |
| 14 #include "SkThreadPool.h" | 15 #include "SkThreadPool.h" |
| 15 #include "SkTime.h" | 16 #include "SkTime.h" |
| 16 #include "Test.h" | 17 #include "Test.h" |
| 17 | 18 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 return false; | 126 return false; |
| 126 } | 127 } |
| 127 if (!FLAGS_gpu && isGPUTest) { | 128 if (!FLAGS_gpu && isGPUTest) { |
| 128 return false; | 129 return false; |
| 129 } | 130 } |
| 130 return true; | 131 return true; |
| 131 } | 132 } |
| 132 | 133 |
| 133 int tool_main(int argc, char** argv); | 134 int tool_main(int argc, char** argv); |
| 134 int tool_main(int argc, char** argv) { | 135 int tool_main(int argc, char** argv) { |
| 136 SetupCrashHandler(); |
| 135 SkCommandLineFlags::SetUsage(""); | 137 SkCommandLineFlags::SetUsage(""); |
| 136 SkCommandLineFlags::Parse(argc, argv); | 138 SkCommandLineFlags::Parse(argc, argv); |
| 137 Test::SetResourcePath(FLAGS_resourcePath[0]); | 139 Test::SetResourcePath(FLAGS_resourcePath[0]); |
| 138 | 140 |
| 139 #if SK_ENABLE_INST_COUNT | 141 #if SK_ENABLE_INST_COUNT |
| 140 if (FLAGS_leaks) { | 142 if (FLAGS_leaks) { |
| 141 gPrintInstCount = true; | 143 gPrintInstCount = true; |
| 142 } | 144 } |
| 143 #endif | 145 #endif |
| 144 | 146 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 233 |
| 232 SkDebugf("\n"); | 234 SkDebugf("\n"); |
| 233 return (failCount == 0) ? 0 : 1; | 235 return (failCount == 0) ? 0 : 1; |
| 234 } | 236 } |
| 235 | 237 |
| 236 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 238 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 237 int main(int argc, char * const argv[]) { | 239 int main(int argc, char * const argv[]) { |
| 238 return tool_main(argc, (char**) argv); | 240 return tool_main(argc, (char**) argv); |
| 239 } | 241 } |
| 240 #endif | 242 #endif |
| OLD | NEW |