aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawOpTest.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-05-12 14:09:46 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-12 19:08:32 +0000
commit177266339c3aa6dda4fa2912af9eaa8e8206f78f (patch)
treec3ab29e45da7b6d58a747d17b5872d3b811cb400 /src/gpu/GrDrawOpTest.h
parentc27321bbb5aa019ed17e56683829b9f2ac93880d (diff)
Include non-legacy GrMeshDrawOps in GLPrograms test.
Bug: skia: Change-Id: Ifa0c3ffb5643c84ccdcb339fae75ea5d03a8451c Reviewed-on: https://skia-review.googlesource.com/16580 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrDrawOpTest.h')
-rw-r--r--src/gpu/GrDrawOpTest.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/gpu/GrDrawOpTest.h b/src/gpu/GrDrawOpTest.h
index 376022999b..a30ca2801f 100644
--- a/src/gpu/GrDrawOpTest.h
+++ b/src/gpu/GrDrawOpTest.h
@@ -13,20 +13,29 @@
#if GR_TEST_UTILS
-class GrContext;
+class GrDrawOp;
class GrLegacyMeshDrawOp;
+class GrPaint;
+class GrRenderTargetContext;
+struct GrUserStencilSettings;
class SkRandom;
-/** This function returns a randomly configured GrDrawOp for testing purposes. */
-std::unique_ptr<GrLegacyMeshDrawOp> GrRandomDrawOp(SkRandom*, GrContext*);
+/** This function draws a randomly configured GrDrawOp for testing purposes. */
+void GrDrawRandomOp(SkRandom*, GrRenderTargetContext*, GrPaint&&);
/** GrDrawOp subclasses should define test factory functions using this macro. */
-#define DRAW_OP_TEST_DEFINE(Op) \
- std::unique_ptr<GrLegacyMeshDrawOp> Op##__Test(SkRandom* random, GrContext* context)
+#define GR_DRAW_OP_TEST_DEFINE(Op) \
+ std::unique_ptr<GrDrawOp> Op##__Test(GrPaint&& paint, SkRandom* random, GrContext* context, \
+ GrFSAAType fsaaType)
-/** This macro may be used if the test factory function must be made a friend of a class. */
-#define DRAW_OP_TEST_FRIEND(Op) \
+/** Variations for GrLegacyMeshDrawOps. To be deleted. */
+#define GR_LEGACY_MESH_DRAW_OP_TEST_DEFINE(Op) \
+ std::unique_ptr<GrLegacyMeshDrawOp> Op##__Test(SkRandom* random, GrContext* context)
+#define GR_LEGACY_MESH_DRAW_OP_TEST_FRIEND(Op) \
friend std::unique_ptr<GrLegacyMeshDrawOp> Op##__Test(SkRandom* random, GrContext* context);
+/** Helper for op test factories to pick a random stencil state. */
+const GrUserStencilSettings* GrGetRandomStencil(SkRandom* random, GrContext*);
+
#endif
#endif