aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrLatticeOp.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 /src/gpu/ops/GrLatticeOp.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 'src/gpu/ops/GrLatticeOp.cpp')
-rw-r--r--src/gpu/ops/GrLatticeOp.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gpu/ops/GrLatticeOp.cpp b/src/gpu/ops/GrLatticeOp.cpp
index 6dce60e987..4b8f5e3c73 100644
--- a/src/gpu/ops/GrLatticeOp.cpp
+++ b/src/gpu/ops/GrLatticeOp.cpp
@@ -21,7 +21,7 @@ static sk_sp<GrGeometryProcessor> create_gp() {
LocalCoords::kHasExplicit_Type, SkMatrix::I());
}
-class NonAALatticeOp final : public GrMeshDrawOp {
+class NonAALatticeOp final : public GrLegacyMeshDrawOp {
public:
DEFINE_OP_CLASS_ID
@@ -133,7 +133,7 @@ private:
positions, vertexStride, kVertsPerRect * patch.fIter->numRectsToDraw());
}
}
- helper.recordDraw(target, gp.get());
+ helper.recordDraw(target, gp.get(), this->pipeline());
}
bool onCombineIfPossible(GrOp* t, const GrCaps& caps) override {
@@ -162,14 +162,15 @@ private:
int fImageHeight;
SkSTArray<1, Patch, true> fPatches;
- typedef GrMeshDrawOp INHERITED;
+ typedef GrLegacyMeshDrawOp INHERITED;
};
namespace GrLatticeOp {
-std::unique_ptr<GrMeshDrawOp> MakeNonAA(GrColor color, const SkMatrix& viewMatrix, int imageWidth,
- int imageHeight, std::unique_ptr<SkLatticeIter> iter,
- const SkRect& dst) {
- return std::unique_ptr<GrMeshDrawOp>(
+std::unique_ptr<GrLegacyMeshDrawOp> MakeNonAA(GrColor color, const SkMatrix& viewMatrix,
+ int imageWidth, int imageHeight,
+ std::unique_ptr<SkLatticeIter> iter,
+ const SkRect& dst) {
+ return std::unique_ptr<GrLegacyMeshDrawOp>(
new NonAALatticeOp(color, viewMatrix, imageWidth, imageHeight, std::move(iter), dst));
}
};