#include <playground_test.h>
Public Member Functions | |
| PlaygroundTest () | |
| virtual | ~PlaygroundTest () |
| void | SetUp () override |
| void | TearDown () override |
| PlaygroundBackend | GetBackend () const |
| std::unique_ptr< fml::Mapping > | OpenAssetAsMapping (std::string asset_name) const override |
| absl::StatusOr< RuntimeStage::Map > | OpenAssetAsRuntimeStage (const char *asset_name) const |
| std::string | GetWindowTitle () const override |
Public Member Functions inherited from impeller::Playground | |
| Playground (PlaygroundBackend backend, const PlaygroundSwitches &switches) | |
| virtual | ~Playground () |
| bool | IsPlaygroundEnabled () const |
| Point | GetCursorPosition () const |
| ISize | GetWindowSize () const |
| IRect | GetWindowBounds () const |
| Point | GetContentScale () const |
| Scalar | GetSecondsElapsed () const |
| Get the amount of time elapsed from the start of the playground's execution. | |
| std::shared_ptr< Context > | GetContext () const |
| std::shared_ptr< Context > | MakeContext () const |
| ContentContext & | GetContentContext () const |
| std::shared_ptr< TypographerContext > | GetTypographerContext () 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. | |
| GLProcAddressResolver | CreateGLProcAddressResolver () const |
| VKProcAddressResolver | CreateVKProcAddressResolver () const |
| void | SetGPUDisabled (bool disabled) const |
| Mark the GPU as unavilable. | |
| RuntimeStageBackend | GetRuntimeStageBackend () const |
Additional Inherited Members | |
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)> |
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 | TearDownContextData () |
| virtual void | EnsureContextIsUnique () |
| Make sure that when the context is later created that it will not be shared with any other playgrounds. | |
| bool | PlatformSupportsWideGamutTests () const |
| Returns true if the platform can support wide gamuts. | |
| virtual bool | EnsureContextSupportsWideGamut () |
| Make sure that when the context is later created that it will support wide gamuts if the platform supports it. Returns whether the platform supports wide gamut. | |
| virtual void | EnsureContextSupportsAntialiasLines () |
| Make sure that when the context is later created that it will support the experimental AA lines flag. | |
| const PlaygroundSwitches & | GetSwitches () const |
| Return an unmodifiable reference to the current switches. The switches might change at the start of a test as it has a brief opportunity to call any of the Ensure* methods that define the environment it expects, but should be stable by the time any subsequent methods that might perform work are called. | |
| void | SetTypographerContext (std::shared_ptr< TypographerContext > typographer_context) |
| void | SetWindowSize (ISize size) |
Definition at line 23 of file playground_test.h.
| impeller::PlaygroundTest::PlaygroundTest | ( | ) |
Definition at line 13 of file playground_test.cc.
References impeller::ImpellerValidationErrorsSetCallback(), and message.
|
virtual |
Reimplemented in impeller::interop::testing::PlaygroundTest.
Definition at line 32 of file playground_test.cc.
References impeller::ImpellerValidationErrorsSetCallback().
| PlaygroundBackend impeller::PlaygroundTest::GetBackend | ( | ) | const |
Definition at line 52 of file playground_test.cc.
Referenced by impeller::interop::testing::PlaygroundTest::CreateContext(), impeller::interop::testing::PlaygroundTest::GetInteropContext(), GetWindowTitle(), and impeller::interop::testing::PlaygroundTest::OpenPlaygroundHere().
|
overridevirtual |
Implements impeller::Playground.
Definition at line 73 of file playground_test.cc.
References GetBackend(), flutter::testing::GetCurrentTestName(), impeller::Playground::GetSwitches(), impeller::kMetal, impeller::kMetalSDF, impeller::kOpenGLES, impeller::kOpenGLESSDF, and impeller::kVulkan.
|
overridevirtual |
Implements impeller::Playground.
Definition at line 57 of file playground_test.cc.
References flutter::testing::OpenFixtureAsMapping().
Referenced by impeller::interop::testing::PlaygroundTest::OpenAssetAsHPPMapping(), and impeller::interop::testing::PlaygroundTest::OpenAssetAsHPPTexture().
| absl::StatusOr< RuntimeStage::Map > impeller::PlaygroundTest::OpenAssetAsRuntimeStage | ( | const char * | asset_name | ) | const |
Definition at line 62 of file playground_test.cc.
References impeller::RuntimeStage::DecodeRuntimeStages(), and flutter::testing::OpenFixtureAsMapping().
|
override |
Definition at line 36 of file playground_test.cc.
References impeller::Playground::ShouldOpenNewPlaygrounds(), and impeller::Playground::SupportsBackend().
Referenced by impeller::interop::testing::PlaygroundTest::SetUp().
|
override |
Definition at line 48 of file playground_test.cc.
References impeller::Playground::TearDownContextData().
Referenced by impeller::AiksPlayground::TearDown(), and impeller::interop::testing::PlaygroundTest::TearDown().