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

Public Member Functions

const GrThreadSafeCache::VertexDatavertexData () const
 
- 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
 
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)
 

Static Public Member Functions

static DEFINE_OP_CLASS_ID GrOp::Owner Make (GrRecordingContext *rContext, TestHelper::Stats *stats, int wh, int id, bool failLookup, bool failFillingIn, GrThreadSafeCache::IsNewerBetter isNewerBetter)
 
- 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

const char * name () const override
 
FixedFunctionFlags fixedFunctionFlags () const override
 
GrProcessorSet::Analysis finalize (const GrCaps &, const GrAppliedClip *, GrClampType) override
 
void onPrePrepare (GrRecordingContext *rContext, const GrSurfaceProxyView &writeView, GrAppliedClip *clip, const GrDstProxyView &dstProxyView, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp) override
 
void onPrepare (GrOpFlushState *flushState) override
 
void onExecute (GrOpFlushState *flushState, const SkRect &chainBounds) override
 

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 GrDrawOp
 GR_DECL_BITFIELD_CLASS_OPS_FRIENDS (FixedFunctionFlags)
 

Detailed Description

Definition at line 475 of file GrThreadSafeCacheTest.cpp.

Member Function Documentation

◆ finalize()

GrProcessorSet::Analysis GrThreadSafeVertexTestOp::finalize ( const GrCaps ,
const GrAppliedClip ,
GrClampType   
)
inlineoverrideprivatevirtual

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 511 of file GrThreadSafeCacheTest.cpp.

511 {
513 }
static constexpr Analysis EmptySetAnalysis()

◆ fixedFunctionFlags()

FixedFunctionFlags GrThreadSafeVertexTestOp::fixedFunctionFlags ( ) const
inlineoverrideprivatevirtual

Reimplemented from GrDrawOp.

Definition at line 510 of file GrThreadSafeCacheTest.cpp.

◆ Make()

static DEFINE_OP_CLASS_ID GrOp::Owner GrThreadSafeVertexTestOp::Make ( GrRecordingContext rContext,
TestHelper::Stats stats,
int  wh,
int  id,
bool  failLookup,
bool  failFillingIn,
GrThreadSafeCache::IsNewerBetter  isNewerBetter 
)
inlinestatic

Definition at line 479 of file GrThreadSafeCacheTest.cpp.

481 {
482
483 return GrOp::Make<GrThreadSafeVertexTestOp>(
484 rContext, rContext, stats, wh, id, failLookup, failFillingIn, isNewerBetter);
485 }

◆ name()

const char * GrThreadSafeVertexTestOp::name ( ) const
inlineoverrideprivatevirtual

Implements GrOp.

Definition at line 509 of file GrThreadSafeCacheTest.cpp.

509{ return "GrThreadSafeVertexTestOp"; }

◆ onExecute()

void GrThreadSafeVertexTestOp::onExecute ( GrOpFlushState flushState,
const SkRect chainBounds 
)
inlineoverrideprivatevirtual

Implements GrOp.

Definition at line 643 of file GrThreadSafeCacheTest.cpp.

643 {
644 if (!fVertexData || !fVertexData->gpuBuffer()) {
645 return;
646 }
647
648 if (!fProgramInfo) {
649 fProgramInfo = this->createProgramInfo(flushState);
650 }
651
652 flushState->bindPipeline(*fProgramInfo, SkRect::MakeIWH(fWH, fWH));
653 flushState->bindBuffers(nullptr, nullptr, fVertexData->refGpuBuffer());
654 flushState->draw(4, 0);
655 }
void bindBuffers(sk_sp< const GrBuffer > indexBuffer, sk_sp< const GrBuffer > instanceBuffer, sk_sp< const GrBuffer > vertexBuffer, GrPrimitiveRestart primitiveRestart=GrPrimitiveRestart::kNo)
void bindPipeline(const GrProgramInfo &programInfo, const SkRect &drawBounds)
void draw(int vertexCount, int baseVertex)
sk_sp< GrGpuBuffer > refGpuBuffer()
static SkRect MakeIWH(int w, int h)
Definition SkRect.h:623

◆ onPrepare()

void GrThreadSafeVertexTestOp::onPrepare ( GrOpFlushState flushState)
inlineoverrideprivatevirtual

Implements GrOp.

Definition at line 635 of file GrThreadSafeCacheTest.cpp.

635 {
636 auto dContext = flushState->gpu()->getContext();
637
638 // This call site is not a noop bc this op could've been created on with DDL context
639 // and, therefore, could be lacking a gpu-side buffer
640 this->findOrCreateVertices(dContext, false, fFailFillingIn);
641 }
GrDirectContext * getContext()
Definition GrGpu.h:67

◆ onPrePrepare()

void GrThreadSafeVertexTestOp::onPrePrepare ( GrRecordingContext rContext,
const GrSurfaceProxyView writeView,
GrAppliedClip clip,
const GrDstProxyView dstProxyView,
GrXferBarrierFlags  renderPassXferBarriers,
GrLoadOp  colorLoadOp 
)
inlineoverrideprivatevirtual

Implements GrOp.

Definition at line 610 of file GrThreadSafeCacheTest.cpp.

615 {
616 SkArenaAlloc* arena = rContext->priv().recordTimeAllocator();
617
618 // DMSAA is not supported on DDL.
619 bool usesMSAASurface = writeView.asRenderTargetProxy()->numSamples() > 1;
620
621 // This is equivalent to a GrOpFlushState::detachAppliedClip
622 GrAppliedClip appliedClip = clip ? std::move(*clip) : GrAppliedClip::Disabled();
623
624 fProgramInfo = this->createProgramInfo(rContext->priv().caps(), arena, writeView,
625 usesMSAASurface, std::move(appliedClip),
626 dstProxyView, renderPassXferBarriers, colorLoadOp);
627
628 rContext->priv().recordProgramInfo(fProgramInfo);
629
630 // This is now a noop (bc it is always called in the ctor) but is where we would normally
631 // create the vertices.
632 this->findOrCreateVertices(rContext, false, fFailFillingIn);
633 }
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
Definition SkPath.cpp:3824
const GrCaps * caps() const
void recordProgramInfo(const GrProgramInfo *programInfo)
SkArenaAlloc * recordTimeAllocator()
GrRecordingContextPriv priv()
GrRenderTargetProxy * asRenderTargetProxy() const

◆ vertexData()

const GrThreadSafeCache::VertexData * GrThreadSafeVertexTestOp::vertexData ( ) const
inline

Definition at line 487 of file GrThreadSafeCacheTest.cpp.

487{ return fVertexData.get(); }
T * get() const
Definition SkRefCnt.h:303

Friends And Related Symbol Documentation

◆ GrOp

friend class GrOp
friend

Definition at line 490 of file GrThreadSafeCacheTest.cpp.


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