#include <runtime_stage.h>
Definition at line 20 of file runtime_stage.h.
◆ Map
◆ RuntimeStage() [1/2]
| impeller::RuntimeStage::RuntimeStage |
( |
const fb::RuntimeStage * |
runtime_stage, |
|
|
const std::shared_ptr< fml::Mapping > & |
payload |
|
) |
| |
Definition at line 94 of file runtime_stage.cc.
97 FML_DCHECK(runtime_stage);
100 entrypoint_ = runtime_stage->entrypoint()->str();
102 auto* uniforms = runtime_stage->uniforms();
104 for (
auto i = uniforms->begin(), end = uniforms->end(); i != end; i++) {
105 RuntimeUniformDescription desc;
106 desc.name = i->name()->str();
107 desc.location = i->location();
108 desc.type =
ToType(i->type());
109 desc.dimensions = RuntimeUniformDimensions{
110 static_cast<size_t>(i->rows()),
static_cast<size_t>(i->columns())};
111 desc.bit_width = i->bit_width();
112 desc.array_elements = i->array_elements();
113 uniforms_.emplace_back(std::move(desc));
117 code_mapping_ = std::make_shared<fml::NonOwnedMapping>(
118 runtime_stage->shader()->data(),
119 runtime_stage->shader()->size(),
120 [payload = payload_](
auto,
auto) {}
References impeller::RuntimeUniformDescription::array_elements, impeller::RuntimeUniformDescription::bit_width, impeller::RuntimeUniformDescription::dimensions, impeller::RuntimeUniformDescription::location, impeller::RuntimeUniformDescription::name, impeller::ToShaderStage(), impeller::ToType(), and impeller::RuntimeUniformDescription::type.
◆ ~RuntimeStage()
| impeller::RuntimeStage::~RuntimeStage |
( |
| ) |
|
|
default |
◆ RuntimeStage() [2/2]
◆ DecodeRuntimeStages()
| RuntimeStage::Map impeller::RuntimeStage::DecodeRuntimeStages |
( |
const std::shared_ptr< fml::Mapping > & |
payload | ) |
|
|
static |
Definition at line 72 of file runtime_stage.cc.
74 if (payload ==
nullptr || !payload->GetMapping()) {
77 if (!fb::RuntimeStagesBufferHasIdentifier(payload->GetMapping())) {
81 auto raw_stages = fb::GetRuntimeStages(payload->GetMapping());
84 RuntimeStageIfPresent(raw_stages->sksl(), payload)},
86 RuntimeStageIfPresent(raw_stages->metal(), payload)},
88 RuntimeStageIfPresent(raw_stages->opengles(), payload)},
90 RuntimeStageIfPresent(raw_stages->vulkan(), payload)},
References impeller::kMetal, impeller::kOpenGLES, impeller::kSkSL, and impeller::kVulkan.
Referenced by impeller::PlaygroundTest::OpenAssetAsRuntimeStage(), impeller::GoldenPlaygroundTest::OpenAssetAsRuntimeStage(), and impeller::testing::TEST_P().
◆ GetCodeMapping()
| const std::shared_ptr< fml::Mapping > & impeller::RuntimeStage::GetCodeMapping |
( |
| ) |
const |
◆ GetEntrypoint()
| const std::string & impeller::RuntimeStage::GetEntrypoint |
( |
| ) |
const |
◆ GetShaderStage()
◆ GetUniform()
Definition at line 143 of file runtime_stage.cc.
145 for (
const auto& uniform : uniforms_) {
146 if (uniform.name == name) {
◆ GetUniforms()
◆ IsDirty()
| bool impeller::RuntimeStage::IsDirty |
( |
| ) |
const |
◆ IsValid()
| bool impeller::RuntimeStage::IsValid |
( |
| ) |
const |
◆ operator=()
◆ SetClean()
| void impeller::RuntimeStage::SetClean |
( |
| ) |
|
The documentation for this class was generated from the following files: