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>
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index 140ff15..241c0fa 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -28,8 +28,8 @@
DEFINE_OP_CLASS_ID
const char* name() const override { return "TestOp"; }
- static std::unique_ptr<GrMeshDrawOp> Make() {
- return std::unique_ptr<GrMeshDrawOp>(new TestOp);
+ static std::unique_ptr<GrLegacyMeshDrawOp> Make() {
+ return std::unique_ptr<GrLegacyMeshDrawOp>(new TestOp);
}
private:
@@ -170,7 +170,7 @@
images.emplace_back(texture3, GrIOType::kWrite_GrIOType);
images.emplace_back(texture4, GrIOType::kRW_GrIOType);
}
- std::unique_ptr<GrMeshDrawOp> op(TestOp::Make());
+ std::unique_ptr<GrLegacyMeshDrawOp> op(TestOp::Make());
GrPaint paint;
auto fp = TestFP::Make(context,
std::move(proxies), std::move(buffers), std::move(images));
@@ -178,7 +178,7 @@
fp = TestFP::Make(std::move(fp));
}
paint.addColorFragmentProcessor(std::move(fp));
- renderTargetContext->priv().testingOnly_addMeshDrawOp(
+ renderTargetContext->priv().testingOnly_addLegacyMeshDrawOp(
std::move(paint), GrAAType::kNone, std::move(op));
}
int refCnt, readCnt, writeCnt;
@@ -270,7 +270,7 @@
auto op =
GrNonAAFillRectOp::Make(GrColor_WHITE, SkMatrix::I(),
SkRect::MakeWH(rtc->width(), rtc->height()), nullptr, nullptr);
- rtc->addMeshDrawOp(pb, GrNoClip(), std::move(op));
+ rtc->addLegacyMeshDrawOp(pb, GrNoClip(), std::move(op));
}
#include "SkCommandLineFlags.h"