Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: tests/Test.h

Issue 321723002: Reland "Clean up Test's resourcePath code." (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ETCBitmapBench fix Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gm/gm.cpp ('k') | tests/Test.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « gm/gm.cpp ('k') | tests/Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698