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

#include <GrGLUniformHandler.h>

Inheritance diagram for GrGLUniformHandler:
GrGLSLUniformHandler

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
 

Friends

class GrGLProgramBuilder
 

Additional Inherited Members

- Public Types inherited from GrGLSLUniformHandler
using UniformHandle = GrGLSLProgramDataManager::UniformHandle
 
- Protected Member Functions inherited from GrGLSLUniformHandler
 GrGLSLUniformHandler (GrGLSLProgramBuilder *program)
 
- Protected Attributes inherited from GrGLSLUniformHandler
GrGLSLProgramBuilderfProgramBuilder
 

Detailed Description

Definition at line 18 of file GrGLUniformHandler.h.

Member Function Documentation

◆ getUniformCStr()

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

Shortcut for getUniformVariable(u).c_str()

Implements GrGLSLUniformHandler.

Definition at line 26 of file GrGLUniformHandler.h.

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

◆ getUniformVariable()

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

Implements GrGLSLUniformHandler.

Definition at line 22 of file GrGLUniformHandler.h.

22 {
23 return fUniforms.item(u.toIndex()).fVariable;
24 }
T & item(int i)
Definition: SkTBlockList.h:217

◆ numUniforms()

int GrGLUniformHandler::numUniforms ( ) const
inlineoverridevirtual

Implements GrGLSLUniformHandler.

Definition at line 30 of file GrGLUniformHandler.h.

30 {
31 return fUniforms.count();
32 }
int count() const
Definition: SkTBlockList.h:167

◆ uniform() [1/2]

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

Implements GrGLSLUniformHandler.

Definition at line 37 of file GrGLUniformHandler.h.

37 {
38 return fUniforms.item(idx);
39 }

◆ uniform() [2/2]

UniformInfo & GrGLUniformHandler::uniform ( int  idx)
inlineoverridevirtual

Implements GrGLSLUniformHandler.

Definition at line 34 of file GrGLUniformHandler.h.

34 {
35 return fUniforms.item(idx);
36 }

Friends And Related Function Documentation

◆ GrGLProgramBuilder

friend class GrGLProgramBuilder
friend

Definition at line 83 of file GrGLUniformHandler.h.

Member Data Documentation

◆ kUniformsPerBlock

const int GrGLUniformHandler::kUniformsPerBlock = 8
static

Definition at line 20 of file GrGLUniformHandler.h.


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