| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 static SkString GetResourcePath(); | 66 static SkString GetResourcePath(); |
| 67 | 67 |
| 68 virtual bool isGPUTest() const { return false; } | 68 virtual bool isGPUTest() const { return false; } |
| 69 virtual void setGrContextFactory(GrContextFactory* factory) {} | 69 virtual void setGrContextFactory(GrContextFactory* factory) {} |
| 70 | 70 |
| 71 protected: | 71 protected: |
| 72 virtual void onGetName(SkString*) = 0; | 72 virtual void onGetName(SkString*) = 0; |
| 73 virtual void onRun(Reporter*) = 0; | 73 virtual void onRun(Reporter*) = 0; |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 static const char* gResourcePath; |
| 77 |
| 76 Reporter* fReporter; | 78 Reporter* fReporter; |
| 77 SkString fName; | 79 SkString fName; |
| 78 bool fPassed; | 80 bool fPassed; |
| 79 SkMSec fElapsed; | 81 SkMSec fElapsed; |
| 80 }; | 82 }; |
| 81 | 83 |
| 82 class GpuTest : public Test{ | 84 class GpuTest : public Test{ |
| 83 public: | 85 public: |
| 84 GpuTest() : Test(), fGrContextFactory(NULL) {} | 86 GpuTest() : Test(), fGrContextFactory(NULL) {} |
| 85 | 87 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } \ | 171 } \ |
| 170 virtual void onRun(Reporter* r) SK_OVERRIDE { \ | 172 virtual void onRun(Reporter* r) SK_OVERRIDE { \ |
| 171 name(r, fGrContextFactory); \ | 173 name(r, fGrContextFactory); \ |
| 172 } \ | 174 } \ |
| 173 }; \ | 175 }; \ |
| 174 static TestRegistry gReg_##name##Class(name##Class::Factory); \ | 176 static TestRegistry gReg_##name##Class(name##Class::Factory); \ |
| 175 } \ | 177 } \ |
| 176 static void name(skiatest::Reporter* reporter, GrContextFactory* factory) | 178 static void name(skiatest::Reporter* reporter, GrContextFactory* factory) |
| 177 | 179 |
| 178 #endif | 180 #endif |
| OLD | NEW |