Flutter Engine
The Flutter Engine
|
#include <GrDrawOp.h>
Public Types | |
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 > |
Public Member Functions | |
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 SkRect & | bounds () const |
void | setClippedBounds (const SkRect &clippedBounds) |
bool | hasAABloat () const |
bool | hasZeroArea () const |
void | operator delete (void *p) |
template<typename T > | |
const T & | cast () const |
template<typename T > | |
T * | cast () |
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 |
GrOp * | nextInChain () const |
GrOp * | prevInChain () 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 Types | |
enum class | FixedFunctionFlags : uint32_t { kNone = 0x0 , kUsesHWAA = 0x1 , kUsesStencil = 0x2 } |
Protected Member Functions | |
GR_DECL_BITFIELD_CLASS_OPS_FRIENDS (FixedFunctionFlags) | |
virtual FixedFunctionFlags | fixedFunctionFlags () const |
Friends | |
class | GrSimpleMeshDrawOpHelper |
class | GrSimpleMeshDrawOpHelperWithStencil |
Additional Inherited Members | |
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 () |
Base class for GrOps that draw. These ops can draw into an op list's GrRenderTarget.
Definition at line 29 of file GrDrawOp.h.
|
strong |
Specifies the effect of clipToShape().
Enumerator | |
---|---|
kFail | |
kClippedGeometrically | |
kClippedInShader | |
kClippedOut |
Definition at line 44 of file GrDrawOp.h.
|
strongprotected |
DEPRECATED: This is a legacy implementation for usesMSAA() and usesStencil(). Newer ops should override those methods directly.
Enumerator | |
---|---|
kNone | |
kUsesHWAA | Indices that the op will enable MSAA. |
kUsesStencil | Indices that the op reads and/or writes the stencil buffer |
Definition at line 104 of file GrDrawOp.h.
|
inline |
Definition at line 31 of file GrDrawOp.h.
|
inlinevirtual |
This is called while the clip is being computed, before finalize(), and before any attempts to combine with other ops. If the op knows how to clip its own geometry then it will generally be much faster than a generalized clip method.
Definition at line 62 of file GrDrawOp.h.
|
pure virtual |
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.
Implemented in skgpu::ganesh::AtlasTextOp, skgpu::ganesh::DrawAtlasPathOp, skiagm::BezierTestOp, CircleOp, ButtCapDashedCircleOp, EllipseOp, DIEllipseOp, CircularRRectOp, EllipticalRRectOp, and TestVertexOp.
|
inlineprotectedvirtual |
Reimplemented in skiagm::BezierTestOp, skgpu::ganesh::AtlasTextOp, skgpu::ganesh::DrawAtlasPathOp, CircleOp, ButtCapDashedCircleOp, EllipseOp, DIEllipseOp, CircularRRectOp, EllipticalRRectOp, and TestVertexOp.
Definition at line 112 of file GrDrawOp.h.
|
protected |
|
inlinevirtual |
Called before setting up the GrAppliedClip and before finalize. This information is required to determine how to compute a GrAppliedClip from a GrClip for this op.
Definition at line 37 of file GrDrawOp.h.
|
inlinevirtual |
Called after finalize, at which point every op should know whether it will need stencil.
Definition at line 82 of file GrDrawOp.h.
|
friend |
Definition at line 118 of file GrDrawOp.h.
|
friend |
Definition at line 119 of file GrDrawOp.h.