Skip to content

Commit 5e1545f

Browse files
csmartdalton86Skia Commit-Bot
authored andcommitted
Finish recording tessellation pipelines
Bug: skia:10419 Change-Id: I37493f0b99490e43798292cbc9f8df87a102001e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319516 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
1 parent a05d27b commit 5e1545f

File tree

5 files changed

+227
-155
lines changed

5 files changed

+227
-155
lines changed

bench/TessellateBench.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,15 @@ class GrPathTessellateOp::TestingOnly_Benchmark : public Benchmark {
148148
for (int i = 0; i < loops; ++i) {
149149
fOp.fTriangleBuffer.reset();
150150
fOp.fTriangleVertexCount = 0;
151-
fOp.fSharedStencilPipeline = nullptr;
151+
fOp.fPipelineForStencils = nullptr;
152+
fOp.fPipelineForFills = nullptr;
152153
fOp.fStencilTrianglesProgram = nullptr;
153-
fOp.fDoFillTriangleBuffer = false;
154+
fOp.fFillTrianglesProgram = nullptr;
154155
fOp.fCubicBuffer.reset();
155156
fOp.fCubicVertexCount = 0;
156-
// Make fStencilTrianglesProgram non-null to keep assertions happy.
157+
// Make fStencilCubicsProgram non-null to keep assertions happy.
157158
fOp.fStencilCubicsProgram = (GrProgramInfo*)-1;
159+
fOp.fFillPathProgram = nullptr;
158160
this->runBench(&fTarget, &fOp);
159161
fTarget.resetAllocator();
160162
}

src/gpu/GrAppliedClip.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class GrAppliedHardClip {
3636
}
3737

3838
GrAppliedHardClip(GrAppliedHardClip&& that) = default;
39-
GrAppliedHardClip(const GrAppliedHardClip&) = delete;
39+
explicit GrAppliedHardClip(const GrAppliedHardClip&) = default;
4040

4141
const GrScissorState& scissorState() const { return fScissorState; }
4242
const GrWindowRectsState& windowRectsState() const { return fWindowRectsState; }

src/gpu/tessellate/GrPathShader.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "src/gpu/GrOpFlushState.h"
1414
#include "src/gpu/GrOpsRenderPass.h"
1515
#include "src/gpu/GrProgramInfo.h"
16+
#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
1617

1718
// This is a common base class for shaders in the GPU tessellator.
1819
class GrPathShader : public GrGeometryProcessor {
@@ -40,13 +41,9 @@ class GrPathShader : public GrGeometryProcessor {
4041
GrXferBarrierFlags renderPassXferBarriers,
4142
const GrUserStencilSettings* stencil,
4243
const GrCaps& caps) {
43-
GrPipeline::InitArgs pipelineArgs;
44-
pipelineArgs.fInputFlags = pipelineFlags;
45-
pipelineArgs.fCaps = &caps;
46-
pipelineArgs.fDstProxyView = dstProxyView;
47-
pipelineArgs.fWriteSwizzle = writeView->swizzle();
48-
auto* pipeline = arena->make<GrPipeline>(pipelineArgs, std::move(processors),
49-
std::move(appliedClip));
44+
auto* pipeline = GrSimpleMeshDrawOpHelper::CreatePipeline(
45+
&caps, arena, writeView->swizzle(), std::move(appliedClip), dstProxyView,
46+
std::move(processors), pipelineFlags);
5047
return MakeProgramInfo(shader, arena, writeView, pipeline, dstProxyView,
5148
renderPassXferBarriers, stencil, caps);
5249
}

0 commit comments

Comments
 (0)