26 , fPathStrokeList(path, stroke,
paint.getColor4f())
27 , fTotalCombinedVerbCnt(path.countVerbs())
29 if (!this->headColor().fitsInBytes()) {
30 fPatchAttribs |= PatchAttribs::kWideColorIfEnabled;
32 SkRect devBounds = path.getBounds();
33 if (!this->headStroke().isHairlineStyle()) {
38 viewMatrix.
mapRect(&devBounds, devBounds);
39 if (this->headStroke().isHairlineStyle()) {
51 }
else if (fStencilProgram) {
66 fPatchAttribs |= PatchAttribs::kExplicitCurveType;
82 SkASSERT(op->fProcessors.isFinalized());
86 fViewMatrix != op->fViewMatrix ||
87 fAAType != op->fAAType ||
88 fProcessors != op->fProcessors ||
89 this->headStroke().isHairlineStyle() != op->headStroke().isHairlineStyle()) {
93 auto combinedAttribs = fPatchAttribs | op->fPatchAttribs;
94 if (!(combinedAttribs & PatchAttribs::kStrokeParams) &&
98 if (this->headStroke().isHairlineStyle()) {
101 combinedAttribs |= PatchAttribs::kStrokeParams;
103 if (!(combinedAttribs & PatchAttribs::kColor) && this->headColor() != op->headColor()) {
106 combinedAttribs |= PatchAttribs::kColor;
111 PatchAttribs::kColor);
112 PatchAttribs neededDynamicStates = combinedAttribs & kDynamicStatesMask;
113 if (neededDynamicStates != PatchAttribs::kNone) {
114 if (!this->shouldUseDynamicStates(neededDynamicStates) ||
115 !op->shouldUseDynamicStates(neededDynamicStates)) {
120 fPatchAttribs = combinedAttribs;
125 *fPathStrokeTail = headCopy;
126 fPathStrokeTail = (op->fPathStrokeTail == &op->fPathStrokeList.fNext) ? &headCopy->
fNext
127 : op->fPathStrokeTail;
129 fTotalCombinedVerbCnt += op->fTotalCombinedVerbCnt;
168 std::move(fProcessors));
202 this->prePrepareTessellator({context->
priv().recordTimeAllocator(), writeView, usesMSAASurface,
203 &dstProxyView, renderPassXferBarriers, colorLoadOp,
206 if (fStencilProgram) {
222 fTessellator->
prepare(flushState,
225 fTotalCombinedVerbCnt);
229 if (fStencilProgram) {
232 fTessellator->
draw(flushState);
237 fTessellator->
draw(flushState);
std::function< void(GrSurfaceProxy *, skgpu::Mipmapped)> GrVisitProxyFunc
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
static GrAppliedClip Disabled()
const GrCaps * caps() const
const GrShaderCaps * shaderCaps() const
GrLoadOp colorLoadOp() const final
const GrDstProxyView & dstProxyView() const final
GrXferBarrierFlags renderPassBarriers() const final
SkArenaAlloc * allocator() override
void bindPipelineAndScissorClip(const GrProgramInfo &programInfo, const SkRect &drawBounds)
const GrSurfaceProxyView & writeView() const final
GrAppliedClip detachAppliedClip() final
const GrCaps & caps() const final
void bindTextures(const GrGeometryProcessor &geomProc, const GrSurfaceProxy &singleGeomProcTexture, const GrPipeline &pipeline)
bool usesMSAASurface() const final
void setBounds(const SkRect &newBounds, HasAABloat aabloat, IsHairline zeroArea)
bool unaffectedByDstValue() const
void visitProxies(const GrVisitProxyFunc &) const
Analysis finalize(const GrProcessorAnalysisColor &, const GrProcessorAnalysisCoverage, const GrAppliedClip *, const GrUserStencilSettings *, const GrCaps &, GrClampType, SkPMColor4f *inputColorOverride)
const GrPipeline & pipeline() const
const GrGeometryProcessor & geomProc() const
void visitFPProxies(const GrVisitProxyFunc &func) const
void recordProgramInfo(const GrProgramInfo *programInfo)
GrRecordingContextPriv priv()
GrRenderTargetProxy * asRenderTargetProxy() const
static const GrPipeline * MakePipeline(const ProgramArgs &, GrAAType, GrAppliedClip &&, GrProcessorSet &&)
static GrProgramInfo * MakeProgram(const ProgramArgs &args, const GrTessellationShader *shader, const GrPipeline *pipeline, const GrUserStencilSettings *stencil)
auto make(Ctor &&ctor) -> decltype(ctor(nullptr))
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
static SkScalar GetInflationRadius(const SkPaint &, SkPaint::Style)
SkScalar getInflationRadius() const
SkPaint::Join getJoin() const
SkPaint::Cap getCap() const
SkScalar getMiter() const
void onPrePrepare(GrRecordingContext *, const GrSurfaceProxyView &, GrAppliedClip *, const GrDstProxyView &, GrXferBarrierFlags, GrLoadOp colorLoadOp) override
void onExecute(GrOpFlushState *, const SkRect &chainBounds) override
CombineResult onCombineIfPossible(GrOp *, SkArenaAlloc *, const GrCaps &) override
StrokeTessellateOp(GrAAType, const SkMatrix &, const SkPath &, const SkStrokeRec &, GrPaint &&)
void onPrepare(GrOpFlushState *) override
void visitProxies(const GrVisitProxyFunc &) const override
GrProcessorSet::Analysis finalize(const GrCaps &, const GrAppliedClip *, GrClampType) override
void draw(GrOpFlushState *) const
void prepare(GrMeshDrawTarget *, const SkMatrix &shaderMatrix, PathStrokeList *, int totalCombinedStrokeVerbCnt)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
static constexpr GrUserStencilSettings kMarkStencil(GrUserStencilSettings::StaticInit< 0x0001, GrUserStencilTest::kLessIfInClip, 0x0000, GrUserStencilOp::kZero, GrUserStencilOp::kReplace, 0xffff >())
static constexpr GrUserStencilSettings kTestAndResetStencil(GrUserStencilSettings::StaticInit< 0x0000, GrUserStencilTest::kLessIfInClip, 0x0001, GrUserStencilOp::kZero, GrUserStencilOp::kReplace, 0xffff >())
bool StrokesHaveEqualParams(const SkStrokeRec &a, const SkStrokeRec &b)
static constexpr Init< Ref, Test, TestMask, PassOp, FailOp, WriteMask > StaticInit()
static const GrUserStencilSettings & kUnused
static SkRect MakeIWH(int w, int h)
void outset(float dx, float dy)
bool contains(SkScalar x, SkScalar y) const