Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
skgpu::graphite::DrawPassCommands::List Class Reference

#include <DrawCommands.h>

Public Types

using Command = std::pair< Type, void * >
 
using Iter = SkTBlockList< Command, 16 >::CIter
 

Public Member Functions

 List ()=default
 
 ~List ()=default
 
int count () const
 
void bindGraphicsPipeline (uint32_t pipelineIndex)
 
void setBlendConstants (std::array< float, 4 > blendConstants)
 
void bindUniformBuffer (BindUniformBufferInfo info, UniformSlot slot)
 
std::pair< int *, int * > bindDeferredTexturesAndSamplers (int numTexSamplers)
 
void setScissor (SkIRect scissor)
 
void bindDrawBuffers (BindBufferInfo vertexAttribs, BindBufferInfo instanceAttribs, BindBufferInfo indices, BindBufferInfo indirect)
 
void draw (PrimitiveType type, unsigned int baseVertex, unsigned int vertexCount)
 
void drawIndexed (PrimitiveType type, unsigned int baseIndex, unsigned int indexCount, unsigned int baseVertex)
 
void drawInstanced (PrimitiveType type, unsigned int baseVertex, unsigned int vertexCount, unsigned int baseInstance, unsigned int instanceCount)
 
void drawIndexedInstanced (PrimitiveType type, unsigned int baseIndex, unsigned int indexCount, unsigned int baseVertex, unsigned int baseInstance, unsigned int instanceCount)
 
void drawIndirect (PrimitiveType type)
 
void drawIndexedIndirect (PrimitiveType type)
 
Iter commands () const
 

Detailed Description

Definition at line 128 of file DrawCommands.h.

Member Typedef Documentation

◆ Command

using skgpu::graphite::DrawPassCommands::List::Command = std::pair<Type, void*>

Definition at line 202 of file DrawCommands.h.

◆ Iter

using skgpu::graphite::DrawPassCommands::List::Iter = SkTBlockList<Command, 16>::CIter

Definition at line 203 of file DrawCommands.h.

Constructor & Destructor Documentation

◆ List()

skgpu::graphite::DrawPassCommands::List::List ( )
default

◆ ~List()

skgpu::graphite::DrawPassCommands::List::~List ( )
default

Member Function Documentation

◆ bindDeferredTexturesAndSamplers()

std::pair< int *, int * > skgpu::graphite::DrawPassCommands::List::bindDeferredTexturesAndSamplers ( int  numTexSamplers)
inline

Definition at line 149 of file DrawCommands.h.

149 {
150 int* textureIndices = fAlloc.makeArrayDefault<int>(numTexSamplers);
151 int* samplerIndices = fAlloc.makeArrayDefault<int>(numTexSamplers);
152 this->add<BindTexturesAndSamplers>(numTexSamplers, textureIndices, samplerIndices);
153 return {textureIndices, samplerIndices};
154 }
T * makeArrayDefault(size_t count)

◆ bindDrawBuffers()

void skgpu::graphite::DrawPassCommands::List::bindDrawBuffers ( BindBufferInfo  vertexAttribs,
BindBufferInfo  instanceAttribs,
BindBufferInfo  indices,
BindBufferInfo  indirect 
)
inline

Definition at line 160 of file DrawCommands.h.

163 {
164 this->add<BindDrawBuffers>(vertexAttribs, instanceAttribs, indices, indirect);
165 }

◆ bindGraphicsPipeline()

void skgpu::graphite::DrawPassCommands::List::bindGraphicsPipeline ( uint32_t  pipelineIndex)
inline

Definition at line 135 of file DrawCommands.h.

135 {
136 this->add<BindGraphicsPipeline>(pipelineIndex);
137 }

◆ bindUniformBuffer()

void skgpu::graphite::DrawPassCommands::List::bindUniformBuffer ( BindUniformBufferInfo  info,
UniformSlot  slot 
)
inline

Definition at line 143 of file DrawCommands.h.

143 {
144 this->add<BindUniformBuffer>(info, slot);
145 }
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213

◆ commands()

Iter skgpu::graphite::DrawPassCommands::List::commands ( ) const
inline

Definition at line 204 of file DrawCommands.h.

204{ return fCommands.items(); }

◆ count()

int skgpu::graphite::DrawPassCommands::List::count ( ) const
inline

Definition at line 133 of file DrawCommands.h.

133{ return fCommands.count(); }
int count() const

◆ draw()

void skgpu::graphite::DrawPassCommands::List::draw ( PrimitiveType  type,
unsigned int  baseVertex,
unsigned int  vertexCount 
)
inline

Definition at line 167 of file DrawCommands.h.

167 {
168 this->add<Draw>(type, baseVertex, vertexCount);
169 }

◆ drawIndexed()

void skgpu::graphite::DrawPassCommands::List::drawIndexed ( PrimitiveType  type,
unsigned int  baseIndex,
unsigned int  indexCount,
unsigned int  baseVertex 
)
inline

Definition at line 171 of file DrawCommands.h.

172 {
173 this->add<DrawIndexed>(type, baseIndex, indexCount, baseVertex);
174 }

◆ drawIndexedIndirect()

void skgpu::graphite::DrawPassCommands::List::drawIndexedIndirect ( PrimitiveType  type)
inline

Definition at line 198 of file DrawCommands.h.

198 {
199 this->add<DrawIndexedIndirect>(type);
200 }

◆ drawIndexedInstanced()

void skgpu::graphite::DrawPassCommands::List::drawIndexedInstanced ( PrimitiveType  type,
unsigned int  baseIndex,
unsigned int  indexCount,
unsigned int  baseVertex,
unsigned int  baseInstance,
unsigned int  instanceCount 
)
inline

Definition at line 182 of file DrawCommands.h.

185 {
186 this->add<DrawIndexedInstanced>(type,
187 baseIndex,
188 indexCount,
189 baseVertex,
190 baseInstance,
191 instanceCount);
192 }

◆ drawIndirect()

void skgpu::graphite::DrawPassCommands::List::drawIndirect ( PrimitiveType  type)
inline

Definition at line 194 of file DrawCommands.h.

194 {
195 this->add<DrawIndirect>(type);
196 }

◆ drawInstanced()

void skgpu::graphite::DrawPassCommands::List::drawInstanced ( PrimitiveType  type,
unsigned int  baseVertex,
unsigned int  vertexCount,
unsigned int  baseInstance,
unsigned int  instanceCount 
)
inline

Definition at line 176 of file DrawCommands.h.

178 {
179 this->add<DrawInstanced>(type, baseVertex, vertexCount, baseInstance, instanceCount);
180 }

◆ setBlendConstants()

void skgpu::graphite::DrawPassCommands::List::setBlendConstants ( std::array< float, 4 >  blendConstants)
inline

Definition at line 139 of file DrawCommands.h.

139 {
140 this->add<SetBlendConstants>(this->copy(blendConstants.data(), 4));
141 }
Definition copy.py:1

◆ setScissor()

void skgpu::graphite::DrawPassCommands::List::setScissor ( SkIRect  scissor)
inline

Definition at line 156 of file DrawCommands.h.

156 {
157 this->add<SetScissor>(scissor);
158 }

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