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
diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp
index 45d0292..132736e 100644
--- a/tests/DeferredCanvasTest.cpp
+++ b/tests/DeferredCanvasTest.cpp
@@ -1,11 +1,12 @@
-
/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+
#include "Test.h"
+#include "TestClassDef.h"
#include "SkBitmap.h"
#include "SkBitmapDevice.h"
#include "SkBitmapProcShader.h"
@@ -832,7 +833,7 @@
REPORTER_ASSERT(reporter, notificationCounter.fStorageAllocatedChangedCount == 1);
}
-static void TestDeferredCanvas(skiatest::Reporter* reporter, GrContextFactory* factory) {
+DEF_GPUTEST(DeferredCanvas, reporter, factory) {
TestDeferredCanvasBitmapAccess(reporter);
TestDeferredCanvasFlush(reporter);
TestDeferredCanvasFreshFrame(reporter);
@@ -850,6 +851,3 @@
TestDeferredCanvasSetSurface(reporter, factory);
}
}
-
-#include "TestClassDef.h"
-DEFINE_GPUTESTCLASS("DeferredCanvas", TestDeferredCanvasClass, TestDeferredCanvas)