diff options
Diffstat (limited to 'tests/Test.cpp')
-rw-r--r-- | tests/Test.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/tests/Test.cpp b/tests/Test.cpp index 95b2f91c0c..daa23b132c 100644 --- a/tests/Test.cpp +++ b/tests/Test.cpp @@ -7,7 +7,6 @@ */ #include "Test.h" -#include "SkCommandLineFlags.h" #include "SkError.h" #include "SkString.h" #include "SkTArray.h" @@ -20,8 +19,6 @@ class GrContext; #endif -DEFINE_string2(tmpDir, t, NULL, "tmp directory for tests to use."); - using namespace skiatest; Reporter::Reporter() : fTestCount(0) { @@ -117,15 +114,23 @@ void Test::run() { } -SkString Test::GetTmpDir() { - const char* tmpDir = FLAGS_tmpDir.isEmpty() ? NULL : FLAGS_tmpDir[0]; - return SkString(tmpDir); -} +/////////////////////////////////////////////////////////////////////////////// -static const char* gResourcePath = NULL; -void Test::SetResourcePath(const char* resourcePath) { gResourcePath = resourcePath; } +#if SK_SUPPORT_GPU +#include "GrContextFactory.h" +GrContextFactory gGrContextFactory; +#endif -SkString Test::GetResourcePath() { - return SkString(gResourcePath); +GrContextFactory* GpuTest::GetGrContextFactory() { +#if SK_SUPPORT_GPU + return &gGrContextFactory; +#else + return NULL; +#endif } +void GpuTest::DestroyContexts() { +#if SK_SUPPORT_GPU + gGrContextFactory.destroyContexts(); +#endif +} |