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

#include <Attribute.h>

Public Member Functions

constexpr Attribute ()=default
 
constexpr Attribute (const char *name, VertexAttribType cpuType, SkSLType gpuType)
 
constexpr Attribute (const Attribute &)=default
 
Attributeoperator= (const Attribute &)=default
 
constexpr bool isInitialized () const
 
constexpr const char * name () const
 
constexpr VertexAttribType cpuType () const
 
constexpr SkSLType gpuType () const
 
constexpr size_t size () const
 
constexpr size_t sizeAlign4 () const
 

Detailed Description

Describes a vertex or instance attribute.

Definition at line 18 of file Attribute.h.

Constructor & Destructor Documentation

◆ Attribute() [1/3]

constexpr skgpu::graphite::Attribute::Attribute ( )
constexprdefault

◆ Attribute() [2/3]

constexpr skgpu::graphite::Attribute::Attribute ( const char *  name,
VertexAttribType  cpuType,
SkSLType  gpuType 
)
inlineconstexpr

Definition at line 21 of file Attribute.h.

24 : fName(name), fCPUType(cpuType), fGPUType(gpuType) {
26 }
#define SkASSERT(cond)
Definition SkAssert.h:116
constexpr SkSLType gpuType() const
Definition Attribute.h:35
constexpr VertexAttribType cpuType() const
Definition Attribute.h:34
constexpr const char * name() const
Definition Attribute.h:33

◆ Attribute() [3/3]

constexpr skgpu::graphite::Attribute::Attribute ( const Attribute )
constexprdefault

Member Function Documentation

◆ cpuType()

constexpr VertexAttribType skgpu::graphite::Attribute::cpuType ( ) const
inlineconstexpr

Definition at line 34 of file Attribute.h.

34{ return fCPUType; }

◆ gpuType()

constexpr SkSLType skgpu::graphite::Attribute::gpuType ( ) const
inlineconstexpr

Definition at line 35 of file Attribute.h.

35{ return fGPUType; }

◆ isInitialized()

constexpr bool skgpu::graphite::Attribute::isInitialized ( ) const
inlineconstexpr

Definition at line 31 of file Attribute.h.

31{ return fGPUType != SkSLType::kVoid; }

◆ name()

constexpr const char * skgpu::graphite::Attribute::name ( ) const
inlineconstexpr

Definition at line 33 of file Attribute.h.

33{ return fName; }

◆ operator=()

Attribute & skgpu::graphite::Attribute::operator= ( const Attribute )
default

◆ size()

constexpr size_t skgpu::graphite::Attribute::size ( ) const
inlineconstexpr

Definition at line 37 of file Attribute.h.

37{ return VertexAttribTypeSize(fCPUType); }
static constexpr size_t VertexAttribTypeSize(VertexAttribType type)
Definition DrawTypes.h:77

◆ sizeAlign4()

constexpr size_t skgpu::graphite::Attribute::sizeAlign4 ( ) const
inlineconstexpr

Definition at line 38 of file Attribute.h.

38{ return SkAlign4(this->size()); }
static constexpr T SkAlign4(T x)
Definition SkAlign.h:16
constexpr size_t size() const
Definition Attribute.h:37

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