aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ResourceCacheTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ResourceCacheTest.cpp')
-rw-r--r--tests/ResourceCacheTest.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index 1bb6766b2c..6707ebf312 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -5,12 +5,12 @@
* found in the LICENSE file.
*/
-#include "Test.h"
-
-// This is a GPU test
#if SK_SUPPORT_GPU
+
#include "GrContextFactory.h"
#include "SkGpuDevice.h"
+#include "Test.h"
+#include "TestClassDef.h"
static const int gWidth = 640;
static const int gHeight = 480;
@@ -58,8 +58,7 @@ static void test_cache(skiatest::Reporter* reporter,
context->setTextureCacheLimits(oldMaxNum, oldMaxBytes);
}
-////////////////////////////////////////////////////////////////////////////////
-static void TestResourceCache(skiatest::Reporter* reporter, GrContextFactory* factory) {
+DEF_GPUTEST(ResourceCache, reporter, factory) {
for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
GrContextFactory::GLContextType glType = static_cast<GrContextFactory::GLContextType>(type);
if (!GrContextFactory::IsRenderingGLContext(glType)) {
@@ -84,8 +83,4 @@ static void TestResourceCache(skiatest::Reporter* reporter, GrContextFactory* fa
}
}
-////////////////////////////////////////////////////////////////////////////////
-#include "TestClassDef.h"
-DEFINE_GPUTESTCLASS("ResourceCache", ResourceCacheTestClass, TestResourceCache)
-
#endif