#include <shader_library_gles.h>
Definition at line 19 of file shader_library_gles.h.
◆ ~ShaderLibraryGLES()
impeller::ShaderLibraryGLES::~ShaderLibraryGLES |
( |
| ) |
|
|
overridedefault |
◆ GetFunction()
std::shared_ptr< const ShaderFunction > impeller::ShaderLibraryGLES::GetFunction |
( |
std::string_view |
name, |
|
|
ShaderStage |
stage |
|
) |
| |
|
overrideprivatevirtual |
Implements impeller::ShaderLibrary.
Definition at line 94 of file shader_library_gles.cc.
96 {
97 ReaderLock lock(functions_mutex_);
98 const auto key = ShaderKey{
name, stage};
99 if (
auto found = functions_.find(
key); found != functions_.end()) {
100 return found->second;
101 }
102 return nullptr;
103}
◆ IsValid()
bool impeller::ShaderLibraryGLES::IsValid |
( |
| ) |
const |
|
overridevirtual |
◆ RegisterFunction()
Reimplemented from impeller::ShaderLibrary.
Definition at line 106 of file shader_library_gles.cc.
109 {
112 }
115 code->GetMapping() ==
nullptr) {
117 return;
118 }
119 const auto key = ShaderKey{
name, stage};
120 WriterLock lock(functions_mutex_);
121 if (functions_.count(
key) != 0) {
123 << " has already been registered.";
124 return;
125 }
126 functions_[
key] = std::shared_ptr<ShaderFunctionGLES>(
new ShaderFunctionGLES(
127 library_id_,
128 stage,
130 code
131 ));
132 auto_fail.Release();
134}
Wraps a closure that is invoked in the destructor unless released by the caller.
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
static std::string GLESShaderNameToShaderKeyName(const std::string &name, ShaderStage stage)
◆ UnregisterFunction()
void impeller::ShaderLibraryGLES::UnregisterFunction |
( |
std::string |
name, |
|
|
ShaderStage |
stage |
|
) |
| |
|
overrideprivatevirtual |
Implements impeller::ShaderLibrary.
Definition at line 137 of file shader_library_gles.cc.
138 {
139 ReaderLock lock(functions_mutex_);
140
141 const auto key = ShaderKey{
name, stage};
142
143 auto found = functions_.find(
key);
144 if (found == functions_.end()) {
146 << " was not found, so it couldn't be unregistered.";
147 return;
148 }
149
150 functions_.erase(found);
151
152 return;
153}
◆ ContextGLES
The documentation for this class was generated from the following files: