aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PrimitiveProcessorTest.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-04-03 10:38:00 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-03 15:13:48 +0000
commitd3ccb0a37f0e62c84fdcd6a77b7b15476b04db7a (patch)
treea050c5624e60eee8193f4aa015269ad3bf14e329 /tests/PrimitiveProcessorTest.cpp
parentdffe9827b18444d1426859d9035f9f0087201f44 (diff)
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 <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/PrimitiveProcessorTest.cpp')
-rw-r--r--tests/PrimitiveProcessorTest.cpp18
1 files changed, 9 insertions, 9 deletions
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<GrMeshDrawOp> Make(int numAttribs) {
- return std::unique_ptr<GrMeshDrawOp>(new Op(numAttribs));
+ static std::unique_ptr<GrLegacyMeshDrawOp> Make(int numAttribs) {
+ return std::unique_ptr<GrLegacyMeshDrawOp>(new Op(numAttribs));
}
private:
@@ -93,12 +93,12 @@ private:
size_t vertexStride = gp->getVertexStride();
SkPoint* vertices = reinterpret_cast<SkPoint*>(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);