Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
GrMeshDrawOp::QuadHelper Class Reference

#include <GrMeshDrawOp.h>

Inheritance diagram for GrMeshDrawOp::QuadHelper:
GrMeshDrawOp::PatternHelper

Public Member Functions

 QuadHelper ()=delete
 
 QuadHelper (GrMeshDrawTarget *, size_t vertexStride, int quadsToDraw)
 
GrSimpleMeshmesh ()
 
void recordDraw (GrMeshDrawTarget *, const GrGeometryProcessor *) const
 
void recordDraw (GrMeshDrawTarget *, const GrGeometryProcessor *, const GrSurfaceProxy *const primProcProxies[]) const
 
void * vertices () const
 

Detailed Description

A specialization of InstanceHelper for quad rendering. It only draws non-antialiased indexed quads.

Definition at line 84 of file GrMeshDrawOp.h.

Constructor & Destructor Documentation

◆ QuadHelper() [1/2]

GrMeshDrawOp::QuadHelper::QuadHelper ( )
delete

◆ QuadHelper() [2/2]

GrMeshDrawOp::QuadHelper::QuadHelper ( GrMeshDrawTarget target,
size_t  vertexStride,
int  quadsToDraw 
)

Definition at line 117 of file GrMeshDrawOp.cpp.

119 {
120 sk_sp<const GrGpuBuffer> indexBuffer = target->resourceProvider()->refNonAAQuadIndexBuffer();
121 if (!indexBuffer) {
122 SkDebugf("Could not get quad index buffer.");
123 return;
124 }
125 this->init(target, GrPrimitiveType::kTriangles, vertexStride, std::move(indexBuffer),
129}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
void init(GrMeshDrawTarget *, GrPrimitiveType, size_t vertexStride, sk_sp< const GrBuffer > indexBuffer, int verticesPerRepetition, int indicesPerRepetition, int repeatCount, int maxRepetitions)
static int NumIndicesPerNonAAQuad()
static int NumVertsPerNonAAQuad()
uint32_t * target

Member Function Documentation

◆ mesh()

GrSimpleMesh * GrMeshDrawOp::PatternHelper::mesh ( )
inline

Definition at line 67 of file GrMeshDrawOp.h.

67{ return fMesh; }

◆ recordDraw() [1/2]

void GrMeshDrawOp::PatternHelper::recordDraw ( GrMeshDrawTarget target,
const GrGeometryProcessor gp 
) const

Called to issue draws to the GrMeshDrawTarget.

Definition at line 62 of file GrMeshDrawOp.cpp.

104 {
105 target->recordDraw(gp, fMesh, 1, fPrimitiveType);
106}

◆ recordDraw() [2/2]

void GrMeshDrawOp::PatternHelper::recordDraw ( GrMeshDrawTarget target,
const GrGeometryProcessor gp,
const GrSurfaceProxy *const  primProcProxies[] 
) const

Definition at line 63 of file GrMeshDrawOp.cpp.

111 {
112 target->recordDraw(gp, fMesh, 1, primProcProxies, fPrimitiveType);
113}

◆ vertices()

void * GrMeshDrawOp::PatternHelper::vertices ( ) const
inline

Definition at line 66 of file GrMeshDrawOp.h.

66{ return fVertices; }

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