Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
GrDrawIndirectWriter Struct Reference

#include <GrDrawIndirectCommand.h>

Public Member Functions

 GrDrawIndirectWriter ()=default
 
 GrDrawIndirectWriter (void *data)
 
 GrDrawIndirectWriter (const GrDrawIndirectWriter &)=delete
 
 GrDrawIndirectWriter (GrDrawIndirectWriter &&that)
 
GrDrawIndirectWriteroperator= (const GrDrawIndirectWriter &)=delete
 
GrDrawIndirectWriteroperator= (GrDrawIndirectWriter &&that)
 
bool operator== (const GrDrawIndirectWriter &that)
 
 operator bool () const
 
GrDrawIndirectWriter makeOffset (int drawCount) const
 
void write (uint32_t instanceCount, uint32_t baseInstance, uint32_t vertexCount, int32_t baseVertex)
 

Detailed Description

Definition at line 39 of file GrDrawIndirectCommand.h.

Constructor & Destructor Documentation

◆ GrDrawIndirectWriter() [1/4]

GrDrawIndirectWriter::GrDrawIndirectWriter ( )
default

◆ GrDrawIndirectWriter() [2/4]

GrDrawIndirectWriter::GrDrawIndirectWriter ( void *  data)
inline

Definition at line 42 of file GrDrawIndirectCommand.h.

42: fData(static_cast<GrDrawIndirectCommand*>(data)) {}

◆ GrDrawIndirectWriter() [3/4]

GrDrawIndirectWriter::GrDrawIndirectWriter ( const GrDrawIndirectWriter )
delete

◆ GrDrawIndirectWriter() [4/4]

GrDrawIndirectWriter::GrDrawIndirectWriter ( GrDrawIndirectWriter &&  that)
inline

Definition at line 44 of file GrDrawIndirectCommand.h.

44{ *this = std::move(that); }

Member Function Documentation

◆ makeOffset()

GrDrawIndirectWriter GrDrawIndirectWriter::makeOffset ( int  drawCount) const
inline

Definition at line 57 of file GrDrawIndirectCommand.h.

57{ return {fData + drawCount}; }

◆ operator bool()

GrDrawIndirectWriter::operator bool ( ) const
inlineexplicit

Definition at line 55 of file GrDrawIndirectCommand.h.

55{ return fData != nullptr; }

◆ operator=() [1/2]

GrDrawIndirectWriter & GrDrawIndirectWriter::operator= ( const GrDrawIndirectWriter )
delete

◆ operator=() [2/2]

GrDrawIndirectWriter & GrDrawIndirectWriter::operator= ( GrDrawIndirectWriter &&  that)
inline

Definition at line 47 of file GrDrawIndirectCommand.h.

47 {
48 fData = that.fData;
49 that.fData = nullptr;
50 return *this;
51 }

◆ operator==()

bool GrDrawIndirectWriter::operator== ( const GrDrawIndirectWriter that)
inline

Definition at line 53 of file GrDrawIndirectCommand.h.

53{ return fData == that.fData; }

◆ write()

void GrDrawIndirectWriter::write ( uint32_t  instanceCount,
uint32_t  baseInstance,
uint32_t  vertexCount,
int32_t  baseVertex 
)
inline

Definition at line 59 of file GrDrawIndirectCommand.h.

60 {
61 *fData++ = {vertexCount, instanceCount, baseVertex, baseInstance};
62 }

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