aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ReadWriteAlphaTest.cpp
diff options
context:
space:
mode:
authorGravatar tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-10 22:08:27 +0000
committerGravatar tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-10 22:08:27 +0000
commit4ee16bfaedb14aff8cf102f1f0722ff2529a9699 (patch)
tree292ed655c6d81fb7e6061467d23e27bd27986a34 /tests/ReadWriteAlphaTest.cpp
parentf3abaeb0c5947e63856209166761d4ea766ff24b (diff)
Add a DEF_GPUTEST() macro.
This macro is similar to DEF_TEST() and simplifies the process of setting up a GPU test. BUG=skia:1952 TEST=tests R=mtklein@google.com Review URL: https://codereview.chromium.org/132293005 git-svn-id: http://skia.googlecode.com/svn/trunk@13033 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/ReadWriteAlphaTest.cpp')
-rw-r--r--tests/ReadWriteAlphaTest.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp
index fb177df8b5..47a5f5a7c1 100644
--- a/tests/ReadWriteAlphaTest.cpp
+++ b/tests/ReadWriteAlphaTest.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2012 Google Inc.
*
@@ -9,14 +8,15 @@
// This test is specific to the GPU backend.
#if SK_SUPPORT_GPU && !defined(SK_BUILD_FOR_ANDROID)
-#include "Test.h"
-#include "SkGpuDevice.h"
#include "GrContextFactory.h"
+#include "SkGpuDevice.h"
+#include "Test.h"
+#include "TestClassDef.h"
static const int X_SIZE = 12;
static const int Y_SIZE = 12;
-static void ReadWriteAlphaTest(skiatest::Reporter* reporter, GrContextFactory* factory) {
+DEF_GPUTEST(ReadWriteAlpha, reporter, factory) {
for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
GrContextFactory::GLContextType glType = static_cast<GrContextFactory::GLContextType>(type);
if (!GrContextFactory::IsRenderingGLContext(glType)) {
@@ -110,7 +110,4 @@ static void ReadWriteAlphaTest(skiatest::Reporter* reporter, GrContextFactory* f
}
}
-#include "TestClassDef.h"
-DEFINE_GPUTESTCLASS("ReadWriteAlpha", ReadWriteAlphaTestClass, ReadWriteAlphaTest)
-
#endif