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 | |
78 Reporter* fReporter; | 76 Reporter* fReporter; |
79 SkString fName; | 77 SkString fName; |
80 bool fPassed; | 78 bool fPassed; |
81 SkMSec fElapsed; | 79 SkMSec fElapsed; |
82 }; | 80 }; |
83 | 81 |
84 class GpuTest : public Test{ | 82 class GpuTest : public Test{ |
85 public: | 83 public: |
86 GpuTest() : Test(), fGrContextFactory(NULL) {} | 84 GpuTest() : Test(), fGrContextFactory(NULL) {} |
87 | 85 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } \ | 169 } \ |
172 virtual void onRun(Reporter* r) SK_OVERRIDE { \ | 170 virtual void onRun(Reporter* r) SK_OVERRIDE { \ |
173 name(r, fGrContextFactory); \ | 171 name(r, fGrContextFactory); \ |
174 } \ | 172 } \ |
175 }; \ | 173 }; \ |
176 static TestRegistry gReg_##name##Class(name##Class::Factory); \ | 174 static TestRegistry gReg_##name##Class(name##Class::Factory); \ |
177 } \ | 175 } \ |
178 static void name(skiatest::Reporter* reporter, GrContextFactory* factory) | 176 static void name(skiatest::Reporter* reporter, GrContextFactory* factory) |
179 | 177 |
180 #endif | 178 #endif |
OLD | NEW |