Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1163)

Unified Diff: src/gpu/GrBatchTest.h

Issue 1109153004: Initial CL to create GrBatchTest infrastructure (Closed) Base URL: https://skia.googlesource.com/skia.git@rand-batch0
Patch Set: windows warnings Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrBatchTest.h
diff --git a/src/gpu/GrBatchTest.h b/src/gpu/GrBatchTest.h
new file mode 100644
index 0000000000000000000000000000000000000000..3199354a8df2e6a7158f5b0553e40764290c02d1
--- /dev/null
+++ b/src/gpu/GrBatchTest.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrBatchTest_DEFINED
+#define GrBatchTest_DEFINED
+
+#include "GrTestUtils.h"
+
+#ifdef GR_TEST_UTILS
+
+class GrBatch;
+class GrContext;
+class SkRandom;
+
+/*
+ * This file defines some macros for testing batches, and also declares functions / objects which
+ * are generally useful for GrBatch testing
+ */
+
+// Batches should define test functions using BATCH_TEST_DEFINE. The other macros defined below
+// are used exclusively by the test harness.
+typedef GrBatch* (*BatchTestFunc)(SkRandom* random, GrContext* context);
+#define BATCH_TEST_DEFINE(Batch) \
+ GrBatch* Batch##__Test(SkRandom* random, GrContext* context)
+#define BATCH_TEST_EXTERN(Batch) \
+ extern GrBatch* Batch##__Test(SkRandom*, GrContext* context);
+#define BATCH_TEST_ENTRY(Batch) \
+ Batch##__Test
+
+GrBatch* GrRandomBatch(SkRandom*, GrContext*);
+
+#endif
+#endif
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/GrBatchTest.cpp » ('j') | src/gpu/GrTestUtils.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698