From d3ccb0a37f0e62c84fdcd6a77b7b15476b04db7a Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Mon, 3 Apr 2017 10:38:00 -0400 Subject: Move pipeline handling out of GrMeshDrawOp. The monolithic GrPipeline is moved to a subclass GrLegacyDrawMeshOp. The pipeline used to record a GrMesh draw in a GrMeshDrawOp must now be passed rather than implicitly using the op's pipeline. Change-Id: I50d77e4dcc8d91a523fa7566ce43a9a291174706 Reviewed-on: https://skia-review.googlesource.com/11002 Commit-Queue: Brian Salomon Reviewed-by: Robert Phillips --- tests/PrimitiveProcessorTest.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'tests/PrimitiveProcessorTest.cpp') diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp index 337c8b93cf..4e4edb7e35 100644 --- a/tests/PrimitiveProcessorTest.cpp +++ b/tests/PrimitiveProcessorTest.cpp @@ -25,14 +25,14 @@ #include "ops/GrMeshDrawOp.h" namespace { -class Op : public GrMeshDrawOp { +class Op : public GrLegacyMeshDrawOp { public: DEFINE_OP_CLASS_ID const char* name() const override { return "Dummy Op"; } - static std::unique_ptr Make(int numAttribs) { - return std::unique_ptr(new Op(numAttribs)); + static std::unique_ptr Make(int numAttribs) { + return std::unique_ptr(new Op(numAttribs)); } private: @@ -93,12 +93,12 @@ private: size_t vertexStride = gp->getVertexStride(); SkPoint* vertices = reinterpret_cast(helper.init(target, vertexStride, 1)); vertices->setRectFan(0.f, 0.f, 1.f, 1.f, vertexStride); - helper.recordDraw(target, gp.get()); + helper.recordDraw(target, gp.get(), this->pipeline()); } int fNumAttribs; - typedef GrMeshDrawOp INHERITED; + typedef GrLegacyMeshDrawOp INHERITED; }; } @@ -126,16 +126,16 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) { #endif GrPaint grPaint; // This one should succeed. - renderTargetContext->priv().testingOnly_addMeshDrawOp(GrPaint(grPaint), GrAAType::kNone, - Op::Make(attribCnt)); + renderTargetContext->priv().testingOnly_addLegacyMeshDrawOp(GrPaint(grPaint), GrAAType::kNone, + Op::Make(attribCnt)); context->flush(); #if GR_GPU_STATS REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 1); REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 0); #endif context->resetGpuStats(); - renderTargetContext->priv().testingOnly_addMeshDrawOp(std::move(grPaint), GrAAType::kNone, - Op::Make(attribCnt + 1)); + renderTargetContext->priv().testingOnly_addLegacyMeshDrawOp(std::move(grPaint), GrAAType::kNone, + Op::Make(attribCnt + 1)); context->flush(); #if GR_GPU_STATS REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0); -- cgit v1.2.3