Flutter Engine
The Flutter Engine
Classes | Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
GrMtlUniformHandler Class Reference

#include <GrMtlUniformHandler.h>

Inheritance diagram for GrMtlUniformHandler:
GrGLSLUniformHandler

Classes

struct  MtlUniformInfo
 

Public Types

enum  { kUniformBinding = 0 , kLastUniformBinding = kUniformBinding }
 
typedef SkTBlockList< MtlUniformInfoUniformInfoArray
 
- Public Types inherited from GrGLSLUniformHandler
using UniformHandle = GrGLSLProgramDataManager::UniformHandle
 

Public Member Functions

const GrShaderVargetUniformVariable (UniformHandle u) const override
 
const char * getUniformCStr (UniformHandle u) const override
 
int numUniforms () const override
 
UniformInfouniform (int idx) override
 
const UniformInfouniform (int idx) const override
 
- Public Member Functions inherited from GrGLSLUniformHandler
virtual ~GrGLSLUniformHandler ()
 
UniformHandle addUniform (const GrProcessor *owner, uint32_t visibility, SkSLType type, const char *name, const char **outName=nullptr)
 
UniformHandle addUniformArray (const GrProcessor *owner, uint32_t visibility, SkSLType type, const char *name, int arrayCount, const char **outName=nullptr)
 
virtual const GrShaderVargetUniformVariable (UniformHandle u) const =0
 
virtual const char * getUniformCStr (UniformHandle u) const =0
 
virtual int numUniforms () const =0
 
virtual UniformInfouniform (int idx)=0
 
virtual const UniformInfouniform (int idx) const =0
 
GrShaderVar getUniformMapping (const GrProcessor &owner, SkString rawName) const
 
GrShaderVar liftUniformToVertexShader (const GrProcessor &owner, SkString rawName)
 

Static Public Attributes

static const int kUniformsPerBlock = 8
 
static constexpr int kUniformBindingCount = kLastUniformBinding + 1
 

Friends

class GrMtlPipelineStateBuilder
 

Additional Inherited Members

- Protected Member Functions inherited from GrGLSLUniformHandler
 GrGLSLUniformHandler (GrGLSLProgramBuilder *program)
 
- Protected Attributes inherited from GrGLSLUniformHandler
GrGLSLProgramBuilderfProgramBuilder
 

Detailed Description

Definition at line 22 of file GrMtlUniformHandler.h.

Member Typedef Documentation

◆ UniformInfoArray

Definition at line 36 of file GrMtlUniformHandler.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kUniformBinding 
kLastUniformBinding 

Definition at line 26 of file GrMtlUniformHandler.h.

Member Function Documentation

◆ getUniformCStr()

const char * GrMtlUniformHandler::getUniformCStr ( UniformHandle  u) const
inlineoverridevirtual

Shortcut for getUniformVariable(u).c_str()

Implements GrGLSLUniformHandler.

Definition at line 42 of file GrMtlUniformHandler.h.

42 {
43 return this->getUniformVariable(u).c_str();
44 }
const GrShaderVar & getUniformVariable(UniformHandle u) const override
const char * c_str() const
Definition: GrShaderVar.h:94

◆ getUniformVariable()

const GrShaderVar & GrMtlUniformHandler::getUniformVariable ( UniformHandle  u) const
inlineoverridevirtual

Implements GrGLSLUniformHandler.

Definition at line 38 of file GrMtlUniformHandler.h.

38 {
39 return fUniforms.item(u.toIndex()).fVariable;
40 }
T & item(int i)
Definition: SkTBlockList.h:217

◆ numUniforms()

int GrMtlUniformHandler::numUniforms ( ) const
inlineoverridevirtual

Implements GrGLSLUniformHandler.

Definition at line 46 of file GrMtlUniformHandler.h.

46 {
47 return fUniforms.count();
48 }
int count() const
Definition: SkTBlockList.h:167

◆ uniform() [1/2]

const UniformInfo & GrMtlUniformHandler::uniform ( int  idx) const
inlineoverridevirtual

Implements GrGLSLUniformHandler.

Definition at line 53 of file GrMtlUniformHandler.h.

53 {
54 return fUniforms.item(idx);
55 }

◆ uniform() [2/2]

UniformInfo & GrMtlUniformHandler::uniform ( int  idx)
inlineoverridevirtual

Implements GrGLSLUniformHandler.

Definition at line 50 of file GrMtlUniformHandler.h.

50 {
51 return fUniforms.item(idx);
52 }

Friends And Related Function Documentation

◆ GrMtlPipelineStateBuilder

friend class GrMtlPipelineStateBuilder
friend

Definition at line 104 of file GrMtlUniformHandler.h.

Member Data Documentation

◆ kUniformBindingCount

constexpr int GrMtlUniformHandler::kUniformBindingCount = kLastUniformBinding + 1
staticconstexpr

Definition at line 30 of file GrMtlUniformHandler.h.

◆ kUniformsPerBlock

const int GrMtlUniformHandler::kUniformsPerBlock = 8
static

Definition at line 24 of file GrMtlUniformHandler.h.


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