Flutter Engine
The Flutter Engine
|
#include <GrUniformDataManager.h>
Classes | |
struct | Uniform |
Public Member Functions | |
GrUniformDataManager (uint32_t uniformCount, uint32_t uniformSize) | |
void | set1i (UniformHandle, int32_t) const override |
void | set1iv (UniformHandle, int arrayCount, const int32_t v[]) const override |
void | set1f (UniformHandle, float v0) const override |
void | set1fv (UniformHandle, int arrayCount, const float v[]) const override |
void | set2i (UniformHandle, int32_t, int32_t) const override |
void | set2iv (UniformHandle, int arrayCount, const int32_t v[]) const override |
void | set2f (UniformHandle, float, float) const override |
void | set2fv (UniformHandle, int arrayCount, const float v[]) const override |
void | set3i (UniformHandle, int32_t, int32_t, int32_t) const override |
void | set3iv (UniformHandle, int arrayCount, const int32_t v[]) const override |
void | set3f (UniformHandle, float, float, float) const override |
void | set3fv (UniformHandle, int arrayCount, const float v[]) const override |
void | set4i (UniformHandle, int32_t, int32_t, int32_t, int32_t) const override |
void | set4iv (UniformHandle, int arrayCount, const int32_t v[]) const override |
void | set4f (UniformHandle, float, float, float, float) const override |
void | set4fv (UniformHandle, int arrayCount, const float v[]) const override |
void | setMatrix2f (UniformHandle, const float matrix[]) const override |
void | setMatrix3f (UniformHandle, const float matrix[]) const override |
void | setMatrix4f (UniformHandle, const float matrix[]) const override |
void | setMatrix2fv (UniformHandle, int arrayCount, const float matrices[]) const override |
void | setMatrix3fv (UniformHandle, int arrayCount, const float matrices[]) const override |
void | setMatrix4fv (UniformHandle, int arrayCount, const float matrices[]) const override |
void | markDirty () |
Public Member Functions inherited from GrGLSLProgramDataManager | |
virtual | ~GrGLSLProgramDataManager () |
virtual void | set1i (UniformHandle, int32_t) const =0 |
virtual void | set1iv (UniformHandle, int arrayCount, const int v[]) const =0 |
virtual void | set1f (UniformHandle, float v0) const =0 |
virtual void | set1fv (UniformHandle, int arrayCount, const float v[]) const =0 |
virtual void | set2i (UniformHandle, int32_t, int32_t) const =0 |
virtual void | set2iv (UniformHandle, int arrayCount, const int v[]) const =0 |
virtual void | set2f (UniformHandle, float, float) const =0 |
virtual void | set2fv (UniformHandle, int arrayCount, const float v[]) const =0 |
virtual void | set3i (UniformHandle, int32_t, int32_t, int32_t) const =0 |
virtual void | set3iv (UniformHandle, int arrayCount, const int v[]) const =0 |
virtual void | set3f (UniformHandle, float, float, float) const =0 |
virtual void | set3fv (UniformHandle, int arrayCount, const float v[]) const =0 |
virtual void | set4i (UniformHandle, int32_t, int32_t, int32_t, int32_t) const =0 |
virtual void | set4iv (UniformHandle, int arrayCount, const int v[]) const =0 |
virtual void | set4f (UniformHandle, float, float, float, float) const =0 |
virtual void | set4fv (UniformHandle, int arrayCount, const float v[]) const =0 |
virtual void | setMatrix2f (UniformHandle, const float matrix[]) const =0 |
virtual void | setMatrix3f (UniformHandle, const float matrix[]) const =0 |
virtual void | setMatrix4f (UniformHandle, const float matrix[]) const =0 |
virtual void | setMatrix2fv (UniformHandle, int arrayCount, const float matrices[]) const =0 |
virtual void | setMatrix3fv (UniformHandle, int arrayCount, const float matrices[]) const =0 |
virtual void | setMatrix4fv (UniformHandle, int arrayCount, const float matrices[]) const =0 |
void | setSkMatrix (UniformHandle, const SkMatrix &) const |
void | setSkM44 (UniformHandle, const SkM44 &) const |
void | setRuntimeEffectUniforms (SkSpan< const SkRuntimeEffect::Uniform >, SkSpan< const UniformHandle >, SkSpan< const Specialized >, const void *src) const |
void | setRuntimeEffectUniforms (SkSpan< const SkRuntimeEffect::Uniform > uniforms, SkSpan< const UniformHandle > handles, const void *src) const |
Protected Member Functions | |
int | copyUniforms (void *dest, const void *src, int numUniforms, SkSLType uniformType) const |
template<int N, SkSLType kFullType, SkSLType kHalfType> | |
void | set (UniformHandle u, const void *v) const |
template<int N, SkSLType kFullType, SkSLType kHalfType> | |
void | setv (UniformHandle u, int arrayCount, const void *v) const |
template<int N, SkSLType FullType, SkSLType HalfType> | |
void | setMatrices (UniformHandle, int arrayCount, const float matrices[]) const |
void * | getBufferPtrAndMarkDirty (const Uniform &uni) const |
Protected Member Functions inherited from GrGLSLProgramDataManager | |
GrGLSLProgramDataManager () | |
Protected Attributes | |
uint32_t | fUniformSize |
bool | fWrite16BitUniforms = false |
skia_private::TArray< Uniform, true > | fUniforms |
SkAutoMalloc | fUniformData |
bool | fUniformsDirty = false |
Additional Inherited Members | |
Public Types inherited from GrGLSLProgramDataManager | |
enum class | Specialized : bool { kNo = false , kYes = true } |
Subclass of GrGLSLProgramDataManager used to store uniforms for a program in a CPU buffer that can be uploaded to a UBO. This currently assumes uniform layouts that are compatible with Vulkan, Dawn, and D3D12. It could be used more broadly if this aspect was made configurable.
Definition at line 23 of file GrUniformDataManager.h.
GrUniformDataManager::GrUniformDataManager | ( | uint32_t | uniformCount, |
uint32_t | uniformSize | ||
) |
Definition at line 19 of file GrUniformDataManager.cpp.
|
protected |
Definition at line 32 of file GrUniformDataManager.cpp.
|
protected |
Definition at line 27 of file GrUniformDataManager.cpp.
|
inline |
Definition at line 53 of file GrUniformDataManager.h.
|
inlineprotected |
Definition at line 80 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Definition at line 118 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Reimplemented in GrMtlPipelineStateDataManager, and GrVkPipelineStateDataManager.
Definition at line 122 of file GrUniformDataManager.cpp.
|
overridevirtual |
Functions for uploading uniform values. The varities ending in v can be used to upload to an array of uniforms. arrayCount must be <= the array count of the uniform.
Implements GrGLSLProgramDataManager.
Definition at line 108 of file GrUniformDataManager.cpp.
|
override |
Definition at line 112 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Definition at line 139 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Reimplemented in GrMtlPipelineStateDataManager, and GrVkPipelineStateDataManager.
Definition at line 144 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Definition at line 128 of file GrUniformDataManager.cpp.
|
override |
Definition at line 133 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Definition at line 164 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Definition at line 169 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Definition at line 150 of file GrUniformDataManager.cpp.
|
override |
Definition at line 158 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Definition at line 190 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Definition at line 199 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Definition at line 175 of file GrUniformDataManager.cpp.
|
override |
Definition at line 184 of file GrUniformDataManager.cpp.
|
inlineprotected |
Definition at line 230 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Reimplemented in GrMtlPipelineStateDataManager.
Definition at line 205 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Reimplemented in GrMtlPipelineStateDataManager, and GrVkPipelineStateDataManager.
Definition at line 209 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Definition at line 213 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Definition at line 217 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Definition at line 221 of file GrUniformDataManager.cpp.
|
overridevirtual |
Implements GrGLSLProgramDataManager.
Definition at line 225 of file GrUniformDataManager.cpp.
|
inlineprotected |
Definition at line 89 of file GrUniformDataManager.cpp.
|
mutableprotected |
Definition at line 80 of file GrUniformDataManager.h.
|
protected |
Definition at line 78 of file GrUniformDataManager.h.
|
mutableprotected |
Definition at line 81 of file GrUniformDataManager.h.
|
protected |
Definition at line 75 of file GrUniformDataManager.h.
|
protected |
Definition at line 76 of file GrUniformDataManager.h.