Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrSimpleMeshDrawOpHelperWithStencil.h
Go to the documentation of this file.
1/*
2 * Copyright 2020 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef GrSimpleMeshDrawOpHelperWithStencil_DEFINED
9#define GrSimpleMeshDrawOpHelperWithStencil_DEFINED
10
12
13/**
14 * This class extends GrSimpleMeshDrawOpHelper to support an optional GrUserStencilSettings. This
15 * uses private inheritance because it non-virtually overrides methods in the base class and should
16 * never be used with a GrSimpleMeshDrawOpHelper pointer or reference.
17 */
19public:
21
24
27 const GrSurfaceProxyView& writeView,
28 bool usesMSAASurface,
30 const GrDstProxyView&,
33 GrXferBarrierFlags renderPassXferBarriers,
34 GrLoadOp colorLoadOp);
35
36 // using declarations can't be templated, so this is a pass through function instead.
37 template <typename Op, typename... OpArgs>
39 OpArgs... opArgs) {
40 return GrSimpleMeshDrawOpHelper::FactoryHelper<Op, OpArgs...>(
41 context, std::move(paint), std::forward<OpArgs>(opArgs)...);
42 }
43
45 InputFlags = InputFlags::kNone);
46
48
50 GrClampType clampType,
51 GrProcessorAnalysisCoverage geometryCoverage,
52 GrProcessorAnalysisColor* geometryColor) {
53 return this->INHERITED::finalizeProcessors(caps, clip, fStencilSettings, clampType,
54 geometryCoverage, geometryColor);
55 }
56
58 GrProcessorAnalysisCoverage geometryCoverage,
59 SkPMColor4f* geometryColor, bool* wideColor);
60
68
70 const SkRect& thisBounds, const SkRect& thatBounds,
71 bool ignoreAAType = false) const;
72
73#if defined(GR_TEST_UTILS)
74 SkString dumpInfo() const;
75#endif
76
77 const GrUserStencilSettings* stencilSettings() const { return fStencilSettings; }
78
79private:
80 const GrUserStencilSettings* fStencilSettings;
81 using INHERITED = GrSimpleMeshDrawOpHelper;
82};
83
84#endif
GrProcessorAnalysisCoverage
GrClampType
GrPrimitiveType
Definition GrTypesPriv.h:42
GrAAType
GrLoadOp
GrXferBarrierFlags
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
Definition SkPath.cpp:3824
FixedFunctionFlags
Definition GrDrawOp.h:104
std::unique_ptr< GrOp > Owner
Definition GrOp.h:72
GrSimpleMeshDrawOpHelper::InputFlags InputFlags
GrProcessorSet::Analysis finalizeProcessors(const GrCaps &caps, const GrAppliedClip *clip, GrClampType clampType, GrProcessorAnalysisCoverage geometryCoverage, GrProcessorAnalysisColor *geometryColor)
GrDrawOp::FixedFunctionFlags fixedFunctionFlags() const
bool isCompatible(const GrSimpleMeshDrawOpHelperWithStencil &that, const GrCaps &, const SkRect &thisBounds, const SkRect &thatBounds, bool ignoreAAType=false) const
static GrOp::Owner FactoryHelper(GrRecordingContext *context, GrPaint &&paint, OpArgs... opArgs)
const GrUserStencilSettings * stencilSettings() const
GrProgramInfo * createProgramInfoWithStencil(const GrCaps *, SkArenaAlloc *, const GrSurfaceProxyView &writeView, bool usesMSAASurface, GrAppliedClip &&, const GrDstProxyView &, GrGeometryProcessor *, GrPrimitiveType, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp)
void visitProxies(const GrVisitProxyFunc &func) const
static GrOp::Owner FactoryHelper(GrRecordingContext *, GrPaint &&, OpArgs &&...)
GrPipeline::InputFlags pipelineFlags() const
GrProcessorSet::Analysis finalizeProcessors(const GrCaps &caps, const GrAppliedClip *clip, GrClampType clampType, GrProcessorAnalysisCoverage geometryCoverage, GrProcessorAnalysisColor *geometryColor)
const GrPipeline * createPipeline(GrOpFlushState *flushState)
const Paint & paint