| Flutter Impeller |

Public Member Functions | List of all members
impeller::RuntimeStagePlayground Class Reference

`#include <runtime_stage_playground.h>`

Inheritance diagram for impeller::RuntimeStagePlayground:

## Public Member Functions
| RuntimeStagePlayground ()
| ~RuntimeStagePlayground ()
bool | RegisterStage (const RuntimeStage &stage)
Public Member Functions inherited from impeller::PlaygroundTest
| PlaygroundTest ()
virtual | ~PlaygroundTest ()
void | SetUp () override
void | TearDown () override
PlaygroundBackend | GetBackend () const
std::unique_ptr< fml::Mapping > | OpenAssetAsMapping (std::string asset_name) const override
RuntimeStage::Map | OpenAssetAsRuntimeStage (const char *asset_name) const
std::string | GetWindowTitle () const override
bool | BackendSupportsFragmentProgram () const
Public Member Functions inherited from impeller::Playground
| Playground (PlaygroundSwitches switches)
virtual | ~Playground ()
void | SetupContext (PlaygroundBackend backend)
void | SetupWindow ()
void | TeardownWindow ()
Point | GetCursorPosition () const
ISize | GetWindowSize () const
Point | GetContentScale () const
Scalar | GetSecondsElapsed () const
| Get the amount of time elapsed from the start of the playground's execution. More...
std::shared_ptr< Context > | GetContext () const
bool | OpenPlaygroundHere (const Renderer::RenderCallback &render_callback)
bool | OpenPlaygroundHere (SinglePassCallback pass_callback)
std::shared_ptr< Texture > | CreateTextureForFixture (const char *fixture_name, bool enable_mipmapping=false) const
std::shared_ptr< Texture > | CreateTextureCubeForFixture (std::array< const char *, 6 > fixture_names) const
fml::Status | SetCapabilities (const std::shared_ptr< Capabilities > &capabilities)
bool | WillRenderSomething () const

## Additional Inherited Members
Public Types inherited from impeller::Playground
using | SinglePassCallback = std::function< bool(RenderPass &pass)>
Static Public Member Functions inherited from impeller::Playground
static bool | ShouldOpenNewPlaygrounds ()
static std::shared_ptr< CompressedImage > | LoadFixtureImageCompressed (std::shared_ptr< fml::Mapping > mapping)
static std::optional< DecompressedImage > | DecodeImageRGBA (const std::shared_ptr< CompressedImage > &compressed)
static std::shared_ptr< Texture > | CreateTextureForMapping (const std::shared_ptr< Context > &context, std::shared_ptr< fml::Mapping > mapping, bool enable_mipmapping=false)
static bool | SupportsBackend (PlaygroundBackend backend)
Protected Member Functions inherited from impeller::Playground
void | SetWindowSize (ISize size)
Protected Attributes inherited from impeller::Playground
const PlaygroundSwitches | switches_

## Detailed Description

Definition at line 14 of file runtime_stage_playground.h.

## Constructor & Destructor Documentation

## ◆ RuntimeStagePlayground()

impeller::RuntimeStagePlayground::RuntimeStagePlayground | ( |  | ) |
| default

## ◆ ~RuntimeStagePlayground()

impeller::RuntimeStagePlayground::~RuntimeStagePlayground | ( |  | ) |
| default

## Member Function Documentation

## ◆ RegisterStage()

bool impeller::RuntimeStagePlayground::RegisterStage | ( | const RuntimeStage & | stage | ) |

Definition at line 20 of file runtime_stage_playground.cc.

20 {
21 std::promise<bool> registration;
22 auto future = registration.get_future();
23 auto library = GetContext()->GetShaderLibrary();
24 GetContext()->GetShaderLibrary()->RegisterFunction(
25 stage.GetEntrypoint(), ToShaderStage(stage.GetShaderStage()),
26 stage.GetCodeMapping(),
27 fml::MakeCopyable([reg = std::move(registration)](bool result) mutable {
28 reg.set_value(result);
29 }));
30 return future.get();
31 }

References impeller::RuntimeStage::GetCodeMapping(), impeller::Playground::GetContext(), impeller::RuntimeStage::GetEntrypoint(), impeller::RuntimeStage::GetShaderStage(), and impeller::ToShaderStage().

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

- impeller/runtime_stage/runtime_stage_playground.h
- impeller/runtime_stage/runtime_stage_playground.cc

impeller::ToShaderStage
constexpr ShaderStage ToShaderStage(RuntimeShaderStage stage)
Definition: shader_types.h:29
impeller::Playground::GetContext
std::shared_ptr< Context > GetContext() const
Definition: playground.cc:86