Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Friends | List of all members
skiagm::BezierQuadTestOp Class Reference
Inheritance diagram for skiagm::BezierQuadTestOp:
skiagm::BezierTestOp GrMeshDrawOp GrDrawOp GrOp SkNoncopyable

Public Member Functions

DEFINE_OP_CLASS_ID const char * name () const override
 
- Public Member Functions inherited from skiagm::BezierTestOp
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 bool usesStencil () const
 
- Public Member Functions inherited from GrOp
virtual ~GrOp ()=default
 
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)
 

Static Public Member Functions

static GrOp::Owner Make (GrRecordingContext *context, const SkRect &rect, const SkPMColor4f &color, const GrPathUtils::QuadUVMatrix &devToUV)
 
- 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 ()
 

Private Member Functions

GrGeometryProcessormakeGP (const GrCaps &caps, SkArenaAlloc *arena) final
 
void onPrepareDraws (GrMeshDrawTarget *target) final
 

Friends

class ::GrOp
 

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 >
 
- Protected Types inherited from GrDrawOp
enum class  FixedFunctionFlags : uint32_t { kNone = 0x0 , kUsesHWAA = 0x1 , kUsesStencil = 0x2 }
 
- Protected Member Functions inherited from skiagm::BezierTestOp
 BezierTestOp (const SkRect &rect, const SkPMColor4f &color, int32_t classID)
 
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)
 
- Static Protected Member Functions inherited from GrMeshDrawOp
static bool CombinedQuadCountWillOverflow (GrAAType aaType, bool willBeUpgradedToAA, int combinedQuadCount)
 
- Protected Attributes inherited from skiagm::BezierTestOp
GrSimpleMeshfMesh = nullptr
 

Detailed Description

Definition at line 355 of file beziereffects.cpp.

Member Function Documentation

◆ Make()

static GrOp::Owner skiagm::BezierQuadTestOp::Make ( GrRecordingContext context,
const SkRect rect,
const SkPMColor4f color,
const GrPathUtils::QuadUVMatrix devToUV 
)
inlinestatic

Definition at line 360 of file beziereffects.cpp.

363 {
364 return GrOp::Make<BezierQuadTestOp>(context, rect, color, devToUV);
365 }
const SkRect & rect() const
const SkPMColor4f & color() const

◆ makeGP()

GrGeometryProcessor * skiagm::BezierQuadTestOp::makeGP ( const GrCaps caps,
SkArenaAlloc arena 
)
inlinefinalprivatevirtual

Implements skiagm::BezierTestOp.

Definition at line 380 of file beziereffects.cpp.

380 {
381 auto tmp = GrQuadEffect::Make(arena, this->color(), SkMatrix::I(), caps, SkMatrix::I(),
382 false);
383 if (!tmp) {
384 return nullptr;
385 }
386 SkASSERT(tmp->vertexStride() == sizeof(Vertex));
387 return tmp;
388 }
#define SkASSERT(cond)
Definition SkAssert.h:116
static GrGeometryProcessor * Make(SkArenaAlloc *arena, const SkPMColor4f &color, const SkMatrix &viewMatrix, const GrCaps &caps, const SkMatrix &localMatrix, bool usesLocalCoords, uint8_t coverage=0xff)
static const SkMatrix & I()

◆ name()

DEFINE_OP_CLASS_ID const char * skiagm::BezierQuadTestOp::name ( ) const
inlineoverridevirtual

Implements GrOp.

Definition at line 358 of file beziereffects.cpp.

358{ return "BezierQuadTestOp"; }

◆ onPrepareDraws()

void skiagm::BezierQuadTestOp::onPrepareDraws ( GrMeshDrawTarget target)
inlinefinalprivatevirtual

Implements GrMeshDrawOp.

Definition at line 390 of file beziereffects.cpp.

390 {
391 QuadHelper helper(target, sizeof(Vertex), 1);
392 Vertex* verts = reinterpret_cast<Vertex*>(helper.vertices());
393 if (!verts) {
394 return;
395 }
396 SkRect rect = this->rect();
397 SkPointPriv::SetRectTriStrip(&verts[0].fPosition, rect, sizeof(Vertex));
398 fDevToUV.apply(verts, 4, sizeof(Vertex), sizeof(SkPoint));
399
400 fMesh = helper.mesh();
401 }
void apply(void *vertices, int vertexCount, size_t stride, size_t uvOffset) const
Definition GrPathUtils.h:87
static void SetRectTriStrip(SkPoint v[], SkScalar l, SkScalar t, SkScalar r, SkScalar b, size_t stride)
uint32_t * target

Friends And Related Symbol Documentation

◆ ::GrOp

friend class ::GrOp
friend

Definition at line 368 of file beziereffects.cpp.


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