Revert "Stack-allocate pipelines for GrMeshDrawOp"
This reverts commit dfe5000a5ff2cabb50ddc139882dc1f3005fa429.
Reason for revert: HWAA pipeline flag not getting set for dashing.
Original change's description:
> Stack-allocate pipelines for GrMeshDrawOp
>
> Stack-allocates the pipelines in onExecute. This saves us from having
> to store the pipelines on the heap, as well as delaying the need to
> detach processors until onExecute. The delay is an improvement because
> it allows us to keep visiting proxies after onPrepare. (Previously,
> they were moved out of GrProcessorSet and into a pipeline during
> onPrepare, so visiting proxies was impossible after that point.)
>
> Bug: skia:8731
> Change-Id: Idc05063fb0dfbfed42b434e429fa5a497097bdae
> Reviewed-on: https://skia-review.googlesource.com/c/193368
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=robertphillips@google.com,csmartdalton@google.com
Change-Id: If706f19423310846de70288f393ac12f17ffeee5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8731
Reviewed-on: https://skia-review.googlesource.com/c/195161
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index 1e44b87..cb9d364 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -713,6 +713,7 @@
private:
void onPrepareDraws(Target* target) override {
+ auto pipe = fHelper.makePipeline(target);
int instanceCount = fPaths.count();
SkMatrix invert;
@@ -793,14 +794,11 @@
firstIndex += draw.fIndexCnt;
firstVertex += draw.fVertexCnt;
}
- target->recordDraw(quadProcessor, meshes, draws.count());
+ target->draw(quadProcessor, pipe.fPipeline, pipe.fFixedDynamicState, nullptr, meshes,
+ draws.count());
}
}
- void onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) override {
- fHelper.executeDrawsAndUploads(this, flushState, chainBounds);
- }
-
CombineResult onCombineIfPossible(GrOp* t, const GrCaps& caps) override {
AAConvexPathOp* that = t->cast<AAConvexPathOp>();
if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {