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

#include <Uniform.h>

Public Member Functions

constexpr Uniform (const char *name, SkSLType type, int count=kNonArray)
 
constexpr Uniform (const Uniform &)=default
 
Uniformoperator= (const Uniform &)=default
 
constexpr const char * name () const
 
constexpr SkSLType type () const
 
constexpr int count () const
 
constexpr bool isPaintColor () const
 

Static Public Member Functions

static constexpr Uniform PaintColor ()
 

Static Public Attributes

static constexpr int kNonArray = 0
 

Detailed Description

Describes a uniform. Uniforms consist of: name: The constant string name to use in the generated SkSL (with mangling) type: The type of the uniform count: Number of elements of 'type' in the array or kNonArray if not an array.

Definition at line 23 of file Uniform.h.

Constructor & Destructor Documentation

◆ Uniform() [1/2]

constexpr skgpu::graphite::Uniform::Uniform ( const char *  name,
SkSLType  type,
int  count = kNonArray 
)
inlineconstexpr

Definition at line 27 of file Uniform.h.

28 : Uniform(name, type, count, /*isPaintColor=*/false) {}
constexpr const char * name() const
Definition Uniform.h:42
constexpr SkSLType type() const
Definition Uniform.h:43
constexpr int count() const
Definition Uniform.h:44

◆ Uniform() [2/2]

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

Member Function Documentation

◆ count()

constexpr int skgpu::graphite::Uniform::count ( ) const
inlineconstexpr

Definition at line 44 of file Uniform.h.

44{ return static_cast<int>(fCount); }

◆ isPaintColor()

constexpr bool skgpu::graphite::Uniform::isPaintColor ( ) const
inlineconstexpr

Definition at line 46 of file Uniform.h.

46{ return static_cast<bool>(fIsPaintColor); }

◆ name()

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

Definition at line 42 of file Uniform.h.

42{ return fName; }

◆ operator=()

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

◆ PaintColor()

static constexpr Uniform skgpu::graphite::Uniform::PaintColor ( )
inlinestaticconstexpr

Definition at line 34 of file Uniform.h.

34 {
35 return Uniform("paintColor", SkSLType::kFloat4,
36 Uniform::kNonArray, /*isPaintColor=*/true);
37 }

◆ type()

constexpr SkSLType skgpu::graphite::Uniform::type ( ) const
inlineconstexpr

Definition at line 43 of file Uniform.h.

43{ return static_cast<SkSLType>(fType); }
SkSLType

Member Data Documentation

◆ kNonArray

constexpr int skgpu::graphite::Uniform::kNonArray = 0
staticconstexpr

Definition at line 25 of file Uniform.h.


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