#include <shader_key.h>
Classes | |
| struct | Equal |
| struct | Hash |
Public Member Functions | |
| ShaderKey (std::string_view p_name, ShaderStage p_stage) | |
Static Public Member Functions | |
| static std::string | MakeUserScopedName (std::string_view scope, std::string_view library_id, std::string_view entrypoint) |
| static std::string | MakeFallbackLibraryId () |
Public Attributes | |
| std::string | name |
| ShaderStage | stage = ShaderStage::kUnknown |
Static Public Attributes | |
| static constexpr std::string_view | kScopeRuntimeEffect = "re" |
| static constexpr std::string_view | kScopeFlutterGPU = "fg" |
| Scope tag for Flutter GPU user shader bundles. | |
Definition at line 18 of file shader_key.h.
|
inline |
Definition at line 22 of file shader_key.h.
|
static |
Returns a process-unique library id for user shader sources that were not constructed via an asset-bearing entry point (e.g. tests, future in-memory APIs). Stable for the lifetime of the source but distinct across sources, so the user-scoped registry name cannot collide.
Definition at line 14 of file shader_key.cc.
Referenced by flutter::gpu::ShaderLibrary::MakeFromFlatbuffer().
|
static |
Build a registry name for a user-supplied shader so it cannot collide with engine-internal names that share the same source-derived entrypoint.
scope is a short tag identifying the source kind (see kScope* constants below). library_id is an opaque identifier that is stable across reloads of the same logical user shader (typically the asset path that loaded the shader). entrypoint is the original shader entrypoint name as produced by impellerc.
Engine-internal entrypoints generated by impellerc are valid identifiers and therefore cannot contain ':', so the colon-separated format makes user-scoped names unspoofable from the engine namespace.
Definition at line 19 of file shader_key.cc.
Referenced by impeller::RuntimeEffectContents::SetRuntimeStage(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), and impeller::testing::TEST().
|
staticconstexpr |
Scope tag for Flutter GPU user shader bundles.
Definition at line 59 of file shader_key.h.
Referenced by impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), and impeller::testing::TEST().
|
staticconstexpr |
Scope tag for RuntimeStage-backed shaders (FragmentProgram / RuntimeEffect).
Definition at line 56 of file shader_key.h.
Referenced by impeller::RuntimeEffectContents::SetRuntimeStage(), impeller::testing::TEST(), impeller::testing::TEST(), and impeller::testing::TEST().
| std::string impeller::ShaderKey::name |
Definition at line 19 of file shader_key.h.
Referenced by impeller::ShaderKey::Equal::operator()().
| ShaderStage impeller::ShaderKey::stage = ShaderStage::kUnknown |
Definition at line 20 of file shader_key.h.
Referenced by impeller::ShaderKey::Equal::operator()().