Index: tests/Test.h |
diff --git a/tests/Test.h b/tests/Test.h |
index a175e374a880a8c160e67b208681c0ee8f564dd2..0a9c306b15963c4d1c611cbd13243f469c0c4edc 100644 |
--- a/tests/Test.h |
+++ b/tests/Test.h |
@@ -62,11 +62,9 @@ |
static SkString GetTmpDir(); |
- static void SetResourcePath(const char*); |
static SkString GetResourcePath(); |
virtual bool isGPUTest() const { return false; } |
- virtual void setGrContextFactory(GrContextFactory* factory) {} |
protected: |
virtual void onGetName(SkString*) = 0; |
@@ -82,14 +80,10 @@ |
class GpuTest : public Test{ |
public: |
GpuTest() : Test() {} |
- |
+ static GrContextFactory* GetGrContextFactory(); |
+ static void DestroyContexts(); |
virtual bool isGPUTest() const { return true; } |
- virtual void setGrContextFactory(GrContextFactory* factory) { |
- fGrContextFactory = factory; |
- } |
- |
- protected: |
- GrContextFactory* fGrContextFactory; // Unowned. |
+ private: |
}; |
typedef SkTRegistry<Test*(*)(void*)> TestRegistry; |
@@ -168,7 +162,7 @@ |
name->set(#name); \ |
} \ |
virtual void onRun(Reporter* r) SK_OVERRIDE { \ |
- name(r, fGrContextFactory); \ |
+ name(r, GetGrContextFactory()); \ |
} \ |
}; \ |
static TestRegistry gReg_##name##Class(name##Class::Factory); \ |