#include <playground_test.h>
Public Types | |
| using | InteropPlaygroundCallback = std::function< bool(const ScopedObject< Context > &context, const ScopedObject< Surface > &surface)> |
Public Types inherited from impeller::Playground | |
| using | SinglePassCallback = std::function< bool(RenderPass &pass)> |
| using | RenderCallback = std::function< bool(RenderTarget &render_target)> |
| using | GLProcAddressResolver = std::function< void *(const char *proc_name)> |
| using | VKProcAddressResolver = std::function< void *(void *instance, const char *proc_name)> |
Public Member Functions | |
| PlaygroundTest () | |
| ~PlaygroundTest () override | |
| PlaygroundTest (const PlaygroundTest &)=delete | |
| PlaygroundTest & | operator= (const PlaygroundTest &)=delete |
| void | SetUp () override |
| void | TearDown () override |
| ScopedObject< Context > | CreateContext () const |
| ScopedObject< Context > | GetInteropContext () |
| hpp::Context | GetHPPContext () |
| hpp::Texture | OpenAssetAsHPPTexture (std::string asset_name) |
| bool | OpenPlaygroundHere (InteropPlaygroundCallback callback) |
| std::unique_ptr< hpp::Mapping > | OpenAssetAsHPPMapping (std::string asset_name) const |
Public Member Functions inherited from impeller::PlaygroundTest | |
| 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 |
Public Member Functions inherited from impeller::Playground | |
| Playground (PlaygroundSwitches switches) | |
| virtual | ~Playground () |
| void | SetupContext (PlaygroundBackend backend, const PlaygroundSwitches &switches) |
| void | SetupWindow () |
| void | TeardownWindow () |
| bool | IsPlaygroundEnabled () const |
| 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 |
| std::shared_ptr< Context > | MakeContext () const |
| bool | OpenPlaygroundHere (const 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 |
Returns true if OpenPlaygroundHere will actually render anything. More... | |
| GLProcAddressResolver | CreateGLProcAddressResolver () const |
| VKProcAddressResolver | CreateVKProcAddressResolver () const |
| void | SetGPUDisabled (bool disabled) const |
| Mark the GPU as unavilable. More... | |
Additional Inherited Members | |
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_ |
Definition at line 17 of file playground_test.h.
| using impeller::interop::testing::PlaygroundTest::InteropPlaygroundCallback = std::function<bool(const ScopedObject<Context>& context, const ScopedObject<Surface>& surface)> |
Definition at line 42 of file playground_test.h.
| impeller::interop::testing::PlaygroundTest::PlaygroundTest | ( | ) |
Definition at line 43 of file playground_test.cc.
References impeller::interop::testing::SetupImpellerHPPProcTableOnce().
|
overridevirtualdefault |
Reimplemented from impeller::PlaygroundTest.
|
delete |
| ScopedObject< Context > impeller::interop::testing::PlaygroundTest::CreateContext | ( | ) | const |
Definition at line 59 of file playground_test.cc.
References impeller::Playground::CreateGLProcAddressResolver(), impeller::Playground::CreateVKProcAddressResolver(), impeller::PlaygroundSwitches::enable_vulkan_validation, ImpellerContextVulkanSettings::enable_vulkan_validation, impeller::PlaygroundTest::GetBackend(), impeller::interop::ImpellerContextCreateMetalNew(), impeller::interop::ImpellerContextCreateOpenGLESNew(), impeller::interop::ImpellerContextCreateVulkanNew(), impeller::interop::ImpellerGetVersion(), impeller::kMetal, impeller::kOpenGLES, impeller::kVulkan, ImpellerContextVulkanSettings::proc_address_callback, impeller::Playground::switches_, and ImpellerContextVulkanSettings::user_data.
| hpp::Context impeller::interop::testing::PlaygroundTest::GetHPPContext | ( | ) |
Definition at line 181 of file playground_test.cc.
References GetInteropContext(), and impeller::interop::ImpellerContextRetain().
Referenced by OpenAssetAsHPPTexture().
| ScopedObject< Context > impeller::interop::testing::PlaygroundTest::GetInteropContext | ( | ) |
Definition at line 168 of file playground_test.cc.
References impeller::interop::testing::CreateSharedContext(), impeller::PlaygroundTest::GetBackend(), and impeller::Playground::GetContext().
Referenced by GetHPPContext(), and OpenPlaygroundHere().
| std::unique_ptr< hpp::Mapping > impeller::interop::testing::PlaygroundTest::OpenAssetAsHPPMapping | ( | std::string | asset_name | ) | const |
Definition at line 187 of file playground_test.cc.
References data, and impeller::PlaygroundTest::OpenAssetAsMapping().
| hpp::Texture impeller::interop::testing::PlaygroundTest::OpenAssetAsHPPTexture | ( | std::string | asset_name | ) |
Definition at line 200 of file playground_test.cc.
References impeller::Playground::DecodeImageRGBA(), GetHPPContext(), kImpellerPixelFormatRGBA8888, impeller::Playground::LoadFixtureImageCompressed(), impeller::PlaygroundTest::OpenAssetAsMapping(), and ImpellerTextureDescriptor::pixel_format.
| bool impeller::interop::testing::PlaygroundTest::OpenPlaygroundHere | ( | InteropPlaygroundCallback | callback | ) |
Definition at line 127 of file playground_test.cc.
References impeller::interop::testing::CreateSharedSurface(), impeller::PlaygroundTest::GetBackend(), GetInteropContext(), impeller::Playground::OpenPlaygroundHere(), and VALIDATION_LOG.
|
delete |
|
override |
|
override |