| 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 "CrashHandler.h" |
| 9 #include "OverwriteLine.h" | 9 #include "OverwriteLine.h" |
| 10 #include "Resources.h" | 10 #include "Resources.h" |
| 11 #include "SkCommonFlags.h" | 11 #include "SkCommonFlags.h" |
| 12 #include "SkGraphics.h" | 12 #include "SkGraphics.h" |
| 13 #include "SkInstCnt.h" | |
| 14 #include "SkOSFile.h" | 13 #include "SkOSFile.h" |
| 15 #include "SkRunnable.h" | 14 #include "SkRunnable.h" |
| 16 #include "SkTArray.h" | 15 #include "SkTArray.h" |
| 17 #include "SkTaskGroup.h" | 16 #include "SkTaskGroup.h" |
| 18 #include "SkTemplates.h" | 17 #include "SkTemplates.h" |
| 19 #include "SkThread.h" | 18 #include "SkThread.h" |
| 20 #include "SkTime.h" | 19 #include "SkTime.h" |
| 21 #include "Test.h" | 20 #include "Test.h" |
| 22 | 21 |
| 23 #if SK_SUPPORT_GPU | 22 #if SK_SUPPORT_GPU |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 if (!FLAGS_gpu && isGPUTest) { | 123 if (!FLAGS_gpu && isGPUTest) { |
| 125 return false; | 124 return false; |
| 126 } | 125 } |
| 127 return true; | 126 return true; |
| 128 } | 127 } |
| 129 | 128 |
| 130 int test_main(); | 129 int test_main(); |
| 131 int test_main() { | 130 int test_main() { |
| 132 SetupCrashHandler(); | 131 SetupCrashHandler(); |
| 133 | 132 |
| 134 #if SK_ENABLE_INST_COUNT | |
| 135 if (FLAGS_leaks) { | |
| 136 gPrintInstCount = true; | |
| 137 } | |
| 138 #endif | |
| 139 | |
| 140 SkAutoGraphics ag; | 133 SkAutoGraphics ag; |
| 141 | 134 |
| 142 { | 135 { |
| 143 SkString header("Skia UnitTests:"); | 136 SkString header("Skia UnitTests:"); |
| 144 if (!FLAGS_match.isEmpty()) { | 137 if (!FLAGS_match.isEmpty()) { |
| 145 header.appendf(" --match"); | 138 header.appendf(" --match"); |
| 146 for (int index = 0; index < FLAGS_match.count(); ++index) { | 139 for (int index = 0; index < FLAGS_match.count(); ++index) { |
| 147 header.appendf(" %s", FLAGS_match[index]); | 140 header.appendf(" %s", FLAGS_match[index]); |
| 148 } | 141 } |
| 149 } | 142 } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 SkDebugf("\n"); | 221 SkDebugf("\n"); |
| 229 return (status.failCount() == 0) ? 0 : 1; | 222 return (status.failCount() == 0) ? 0 : 1; |
| 230 } | 223 } |
| 231 | 224 |
| 232 #if !defined(SK_BUILD_FOR_IOS) | 225 #if !defined(SK_BUILD_FOR_IOS) |
| 233 int main(int argc, char** argv) { | 226 int main(int argc, char** argv) { |
| 234 SkCommandLineFlags::Parse(argc, argv); | 227 SkCommandLineFlags::Parse(argc, argv); |
| 235 return test_main(); | 228 return test_main(); |
| 236 } | 229 } |
| 237 #endif | 230 #endif |
| OLD | NEW |