| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #ifndef skiatest_Test_DEFINED | 8 #ifndef skiatest_Test_DEFINED |
| 9 #define skiatest_Test_DEFINED | 9 #define skiatest_Test_DEFINED |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 Reporter* fReporter; | 74 Reporter* fReporter; |
| 75 SkString fName; | 75 SkString fName; |
| 76 bool fPassed; | 76 bool fPassed; |
| 77 SkMSec fElapsed; | 77 SkMSec fElapsed; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 class GpuTest : public Test{ | 80 class GpuTest : public Test{ |
| 81 public: | 81 public: |
| 82 GpuTest() : Test() {} | 82 GpuTest() : Test() {} |
| 83 static GrContextFactory* GetGrContextFactory(); | 83 static GrContextFactory* GetGrContextFactory(); |
| 84 static void DestroyContexts(); | |
| 85 virtual bool isGPUTest() const { return true; } | 84 virtual bool isGPUTest() const { return true; } |
| 86 private: | 85 private: |
| 87 }; | 86 }; |
| 88 | 87 |
| 89 typedef SkTRegistry<Test*(*)(void*)> TestRegistry; | 88 typedef SkTRegistry<Test*(*)(void*)> TestRegistry; |
| 90 } // namespace skiatest | 89 } // namespace skiatest |
| 91 | 90 |
| 92 /* | 91 /* |
| 93 Use the following macros to make use of the skiatest classes, e.g. | 92 Use the following macros to make use of the skiatest classes, e.g. |
| 94 | 93 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 } \ | 162 } \ |
| 164 virtual void onRun(Reporter* r) SK_OVERRIDE { \ | 163 virtual void onRun(Reporter* r) SK_OVERRIDE { \ |
| 165 name(r, GetGrContextFactory()); \ | 164 name(r, GetGrContextFactory()); \ |
| 166 } \ | 165 } \ |
| 167 }; \ | 166 }; \ |
| 168 static TestRegistry gReg_##name##Class(name##Class::Factory); \ | 167 static TestRegistry gReg_##name##Class(name##Class::Factory); \ |
| 169 } \ | 168 } \ |
| 170 static void name(skiatest::Reporter* reporter, GrContextFactory* factory) | 169 static void name(skiatest::Reporter* reporter, GrContextFactory* factory) |
| 171 | 170 |
| 172 #endif | 171 #endif |
| OLD | NEW |