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 "SkCommandLineFlags.h" | 8 #include "SkCommandLineFlags.h" |
9 #include "SkGraphics.h" | 9 #include "SkGraphics.h" |
10 #include "SkRunnable.h" | 10 #include "SkRunnable.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 : fNextIndex(0) | 70 : fNextIndex(0) |
71 , fTotal(0) | 71 , fTotal(0) |
72 , fAllowExtendedTest(allowExtendedTest) | 72 , fAllowExtendedTest(allowExtendedTest) |
73 , fAllowThreaded(allowThreaded) { | 73 , fAllowThreaded(allowThreaded) { |
74 } | 74 } |
75 | 75 |
76 void setTotal(int total) { | 76 void setTotal(int total) { |
77 fTotal = total; | 77 fTotal = total; |
78 } | 78 } |
79 | 79 |
80 virtual bool allowExtendedTest() const { | 80 virtual bool allowExtendedTest() const SK_OVERRIDE { |
81 return fAllowExtendedTest; | 81 return fAllowExtendedTest; |
82 } | 82 } |
83 | 83 |
84 virtual bool allowThreaded() const { | 84 virtual bool allowThreaded() const SK_OVERRIDE { |
85 return fAllowThreaded; | 85 return fAllowThreaded; |
86 } | 86 } |
87 | 87 |
88 protected: | 88 protected: |
89 virtual void onStart(Test* test) { | 89 virtual void onStart(Test* test) { |
90 const int index = sk_atomic_inc(&fNextIndex); | 90 const int index = sk_atomic_inc(&fNextIndex); |
91 SkDebugf("[%d/%d] %s...\n", index+1, fTotal, test->getName()); | 91 SkDebugf("[%d/%d] %s...\n", index+1, fTotal, test->getName()); |
92 } | 92 } |
93 virtual void onReport(const char desc[], Reporter::Result result) { | 93 virtual void onReport(const char desc[], Reporter::Result result) { |
94 SkDebugf("\t%s: %s\n", result2string(result), desc); | 94 SkDebugf("\t%s: %s\n", result2string(result), desc); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 GpuTest::DestroyContexts(); | 254 GpuTest::DestroyContexts(); |
255 | 255 |
256 return (failCount == 0) ? 0 : 1; | 256 return (failCount == 0) ? 0 : 1; |
257 } | 257 } |
258 | 258 |
259 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 259 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
260 int main(int argc, char * const argv[]) { | 260 int main(int argc, char * const argv[]) { |
261 return tool_main(argc, (char**) argv); | 261 return tool_main(argc, (char**) argv); |
262 } | 262 } |
263 #endif | 263 #endif |
OLD | NEW |