Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
skiagm::BezierTestOp Class Referenceabstract
Inheritance diagram for skiagm::BezierTestOp:
GrMeshDrawOp GrDrawOp GrOp SkNoncopyable skiagm::BezierConicTestOp skiagm::BezierQuadTestOp

Public Member Functions

FixedFunctionFlags fixedFunctionFlags () const override
 
GrProcessorSet::Analysis finalize (const GrCaps &caps, const GrAppliedClip *clip, GrClampType clampType) override
 
void visitProxies (const GrVisitProxyFunc &func) const override
 
- Public Member Functions inherited from GrDrawOp
 GrDrawOp (uint32_t classID)
 
virtual bool usesMSAA () const
 
virtual ClipResult clipToShape (skgpu::ganesh::SurfaceDrawContext *, SkClipOp, const SkMatrix &, const GrShape &, GrAA)
 
virtual GrProcessorSet::Analysis finalize (const GrCaps &, const GrAppliedClip *, GrClampType)=0
 
virtual bool usesStencil () const
 
- Public Member Functions inherited from GrOp
virtual ~GrOp ()=default
 
virtual const char * name () const =0
 
virtual void visitProxies (const GrVisitProxyFunc &) const
 
CombineResult combineIfPossible (GrOp *that, SkArenaAlloc *alloc, const GrCaps &caps)
 
const SkRectbounds () const
 
void setClippedBounds (const SkRect &clippedBounds)
 
bool hasAABloat () const
 
bool hasZeroArea () const
 
void operator delete (void *p)
 
template<typename T >
const Tcast () const
 
template<typename T >
Tcast ()
 
uint32_t classID () const
 
uint32_t uniqueID () const
 
void prePrepare (GrRecordingContext *context, const GrSurfaceProxyView &dstView, GrAppliedClip *clip, const GrDstProxyView &dstProxyView, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp)
 
void prepare (GrOpFlushState *state)
 
void execute (GrOpFlushState *state, const SkRect &chainBounds)
 
void chainConcat (GrOp::Owner)
 
bool isChainHead () const
 
bool isChainTail () const
 
GrOpnextInChain () const
 
GrOpprevInChain () const
 
GrOp::Owner cutChain ()
 
void setBounds (const SkRect &newBounds, HasAABloat aabloat, IsHairline zeroArea)
 
void setTransformedBounds (const SkRect &srcBounds, const SkMatrix &m, HasAABloat aabloat, IsHairline zeroArea)
 
void makeFullScreen (GrSurfaceProxy *proxy)
 

Protected Member Functions

 BezierTestOp (const SkRect &rect, const SkPMColor4f &color, int32_t classID)
 
virtual GrGeometryProcessormakeGP (const GrCaps &caps, SkArenaAlloc *arena)=0
 
GrProgramInfoprogramInfo () override
 
void onCreateProgramInfo (const GrCaps *caps, SkArenaAlloc *arena, const GrSurfaceProxyView &writeView, bool usesMSAASurface, GrAppliedClip &&appliedClip, const GrDstProxyView &dstProxyView, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp) override
 
void onExecute (GrOpFlushState *flushState, const SkRect &chainBounds) final
 
const SkRectrect () const
 
const SkPMColor4fcolor () const
 
- Protected Member Functions inherited from GrMeshDrawOp
 GrMeshDrawOp (uint32_t classID)
 
void createProgramInfo (const GrCaps *caps, SkArenaAlloc *arena, const GrSurfaceProxyView &writeView, bool usesMSAASurface, GrAppliedClip &&appliedClip, const GrDstProxyView &dstProxyView, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp)
 
void createProgramInfo (GrMeshDrawTarget *)
 
virtual void onPrePrepareDraws (GrRecordingContext *, const GrSurfaceProxyView &writeView, GrAppliedClip *, const GrDstProxyView &, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp)
 
- Protected Member Functions inherited from GrDrawOp
 GR_DECL_BITFIELD_CLASS_OPS_FRIENDS (FixedFunctionFlags)
 
virtual FixedFunctionFlags fixedFunctionFlags () const
 

Protected Attributes

GrSimpleMeshfMesh = nullptr
 

Additional Inherited Members

- Public Types inherited from GrDrawOp
enum class  ClipResult { kFail , kClippedGeometrically , kClippedInShader , kClippedOut }
 
- Public Types inherited from GrOp
enum class  CombineResult { kMerged , kMayChain , kCannotCombine }
 
enum class  HasAABloat : bool { kNo = false , kYes = true }
 
enum class  IsHairline : bool { kNo = false , kYes = true }
 
using Owner = std::unique_ptr< GrOp >
 
- Static Public Member Functions inherited from GrMeshDrawOp
static bool CanUpgradeAAOnMerge (GrAAType aa1, GrAAType aa2)
 
- Static Public Member Functions inherited from GrOp
template<typename Op , typename... Args>
static Owner Make (GrRecordingContext *context, Args &&... args)
 
template<typename Op , typename... Args>
static Owner MakeWithProcessorSet (GrRecordingContext *context, const SkPMColor4f &color, GrPaint &&paint, Args &&... args)
 
template<typename Op , typename... Args>
static Owner MakeWithExtraMemory (GrRecordingContext *context, size_t extraSize, Args &&... args)
 
static uint32_t GenOpClassID ()
 
- Protected Types inherited from GrDrawOp
enum class  FixedFunctionFlags : uint32_t { kNone = 0x0 , kUsesHWAA = 0x1 , kUsesStencil = 0x2 }
 
- Static Protected Member Functions inherited from GrMeshDrawOp
static bool CombinedQuadCountWillOverflow (GrAAType aaType, bool willBeUpgradedToAA, int combinedQuadCount)
 

Detailed Description

Definition at line 59 of file beziereffects.cpp.

Constructor & Destructor Documentation

◆ BezierTestOp()

skiagm::BezierTestOp::BezierTestOp ( const SkRect rect,
const SkPMColor4f color,
int32_t  classID 
)
inlineprotected

Definition at line 79 of file beziereffects.cpp.

80 : INHERITED(classID)
81 , fRect(rect)
82 , fColor(color)
83 , fProcessorSet(SkBlendMode::kSrc) {
85 }
uint32_t classID() const
Definition: GrOp.h:158
void setBounds(const SkRect &newBounds, HasAABloat aabloat, IsHairline zeroArea)
Definition: GrOp.h:279
const SkRect & rect() const
const SkPMColor4f & color() const

Member Function Documentation

◆ color()

const SkPMColor4f & skiagm::BezierTestOp::color ( ) const
inlineprotected

Definition at line 132 of file beziereffects.cpp.

132{ return fColor; }

◆ finalize()

GrProcessorSet::Analysis skiagm::BezierTestOp::finalize ( const GrCaps ,
const GrAppliedClip ,
GrClampType   
)
inlineoverridevirtual

This is called after the GrAppliedClip has been computed and just prior to recording the op or combining it with a previously recorded op. The op should convert any proxies or resources it owns to "pending io" status so that resource allocation can be more optimal. Additionally, at this time the op must report whether a copy of the destination (or destination texture itself) needs to be provided to the GrXferProcessor when this op executes.

Implements GrDrawOp.

Definition at line 63 of file beziereffects.cpp.

64 {
65 return fProcessorSet.finalize(
67 &GrUserStencilSettings::kUnused, caps, clampType, &fColor);
68 }
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
Definition: SkPath.cpp:3892
Analysis finalize(const GrProcessorAnalysisColor &, const GrProcessorAnalysisCoverage, const GrAppliedClip *, const GrUserStencilSettings *, const GrCaps &, GrClampType, SkPMColor4f *inputColorOverride)
static const GrUserStencilSettings & kUnused

◆ fixedFunctionFlags()

FixedFunctionFlags skiagm::BezierTestOp::fixedFunctionFlags ( ) const
inlineoverridevirtual

Reimplemented from GrDrawOp.

Definition at line 61 of file beziereffects.cpp.

◆ makeGP()

virtual GrGeometryProcessor * skiagm::BezierTestOp::makeGP ( const GrCaps caps,
SkArenaAlloc arena 
)
protectedpure virtual

◆ onCreateProgramInfo()

void skiagm::BezierTestOp::onCreateProgramInfo ( const GrCaps caps,
SkArenaAlloc arena,
const GrSurfaceProxyView writeView,
bool  usesMSAASurface,
GrAppliedClip &&  appliedClip,
const GrDstProxyView dstProxyView,
GrXferBarrierFlags  renderPassXferBarriers,
GrLoadOp  colorLoadOp 
)
inlineoverrideprotectedvirtual

Implements GrMeshDrawOp.

Definition at line 91 of file beziereffects.cpp.

98 {
99 auto gp = this->makeGP(*caps, arena);
100 if (!gp) {
101 return;
102 }
103
105
106 fProgramInfo = GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps, arena, writeView,
107 usesMSAASurface,
108 std::move(appliedClip),
109 dstProxyView, gp,
110 std::move(fProcessorSet),
112 renderPassXferBarriers,
113 colorLoadOp,
114 flags);
115 }
static GrProgramInfo * CreateProgramInfo(const GrCaps *, SkArenaAlloc *, const GrPipeline *, const GrSurfaceProxyView &writeView, bool usesMSAASurface, GrGeometryProcessor *, GrPrimitiveType, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp, const GrUserStencilSettings *=&GrUserStencilSettings::kUnused)
virtual GrGeometryProcessor * makeGP(const GrCaps &caps, SkArenaAlloc *arena)=0
FlutterSemanticsFlag flags

◆ onExecute()

void skiagm::BezierTestOp::onExecute ( GrOpFlushState flushState,
const SkRect chainBounds 
)
inlinefinalprotectedvirtual

Implements GrOp.

Definition at line 117 of file beziereffects.cpp.

117 {
118 if (!fProgramInfo) {
119 this->createProgramInfo(flushState);
120 }
121
122 if (!fProgramInfo) {
123 return;
124 }
125
126 flushState->bindPipelineAndScissorClip(*fProgramInfo, chainBounds);
127 flushState->bindTextures(fProgramInfo->geomProc(), nullptr, fProgramInfo->pipeline());
128 flushState->drawMesh(*fMesh);
129 }
void createProgramInfo(const GrCaps *caps, SkArenaAlloc *arena, const GrSurfaceProxyView &writeView, bool usesMSAASurface, GrAppliedClip &&appliedClip, const GrDstProxyView &dstProxyView, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp)
Definition: GrMeshDrawOp.h:39
void drawMesh(const GrSimpleMesh &mesh)
void bindPipelineAndScissorClip(const GrProgramInfo &programInfo, const SkRect &drawBounds)
void bindTextures(const GrGeometryProcessor &geomProc, const GrSurfaceProxy &singleGeomProcTexture, const GrPipeline &pipeline)
const GrPipeline & pipeline() const
Definition: GrProgramInfo.h:39
const GrGeometryProcessor & geomProc() const
Definition: GrProgramInfo.h:40
GrSimpleMesh * fMesh

◆ programInfo()

GrProgramInfo * skiagm::BezierTestOp::programInfo ( )
inlineoverrideprotectedvirtual

Implements GrMeshDrawOp.

Definition at line 89 of file beziereffects.cpp.

89{ return fProgramInfo; }

◆ rect()

const SkRect & skiagm::BezierTestOp::rect ( ) const
inlineprotected

Definition at line 131 of file beziereffects.cpp.

131{ return fRect; }

◆ visitProxies()

void skiagm::BezierTestOp::visitProxies ( const GrVisitProxyFunc func) const
inlineoverridevirtual

Reimplemented from GrOp.

Definition at line 70 of file beziereffects.cpp.

70 {
71 if (fProgramInfo) {
72 fProgramInfo->visitFPProxies(func);
73 } else {
74 fProcessorSet.visitProxies(func);
75 }
76 }
void visitProxies(const GrVisitProxyFunc &) const
void visitFPProxies(const GrVisitProxyFunc &func) const
Definition: GrProgramInfo.h:64

Member Data Documentation

◆ fMesh

GrSimpleMesh* skiagm::BezierTestOp::fMesh = nullptr
protected

Definition at line 135 of file beziereffects.cpp.


The documentation for this class was generated from the following file: