aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/convexpolyeffect.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 /gm/convexpolyeffect.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 'gm/convexpolyeffect.cpp')
-rw-r--r--gm/convexpolyeffect.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index 0ce7ba71ab..8ace4d0b3d 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -46,8 +46,8 @@ public:
const char* name() const override { return "PolyBoundsOp"; }
- static std::unique_ptr<GrMeshDrawOp> Make(const SkRect& rect, GrColor color) {
- return std::unique_ptr<GrMeshDrawOp>(new PolyBoundsOp(rect, color));
+ static std::unique_ptr<GrLegacyMeshDrawOp> Make(const SkRect& rect, GrColor color) {
+ return std::unique_ptr<GrLegacyMeshDrawOp>(new PolyBoundsOp(rect, color));
}
private:
@@ -71,7 +71,7 @@ private:
fRect.toQuad(verts);
- helper.recordDraw(target, gp.get());
+ helper.recordDraw(target, gp.get(), this->pipeline());
}
SkRect fRect;
@@ -183,9 +183,10 @@ protected:
grPaint.setXPFactory(GrPorterDuffXPFactory::Get(SkBlendMode::kSrc));
grPaint.addCoverageFragmentProcessor(std::move(fp));
- std::unique_ptr<GrMeshDrawOp> op = PolyBoundsOp::Make(p.getBounds(), 0xff000000);
+ std::unique_ptr<GrLegacyMeshDrawOp> op =
+ PolyBoundsOp::Make(p.getBounds(), 0xff000000);
- renderTargetContext->priv().testingOnly_addMeshDrawOp(
+ renderTargetContext->priv().testingOnly_addLegacyMeshDrawOp(
std::move(grPaint), GrAAType::kNone, std::move(op));
x += SkScalarCeilToScalar(path->getBounds().width() + kDX);
@@ -223,9 +224,9 @@ protected:
grPaint.setXPFactory(GrPorterDuffXPFactory::Get(SkBlendMode::kSrc));
grPaint.addCoverageFragmentProcessor(std::move(fp));
- std::unique_ptr<GrMeshDrawOp> op = PolyBoundsOp::Make(rect, 0xff000000);
+ std::unique_ptr<GrLegacyMeshDrawOp> op = PolyBoundsOp::Make(rect, 0xff000000);
- renderTargetContext->priv().testingOnly_addMeshDrawOp(
+ renderTargetContext->priv().testingOnly_addLegacyMeshDrawOp(
std::move(grPaint), GrAAType::kNone, std::move(op));
x += SkScalarCeilToScalar(rect.width() + kDX);