#include <golden_playground_test.h>
Classes | |
struct | GoldenPlaygroundTestImpl |
Public Types | |
using | AiksPlaygroundCallback = std::function< std::optional< Picture >(AiksContext &renderer)> |
using | AiksDlPlaygroundCallback = std::function< sk_sp< flutter::DisplayList >()> |
Public Member Functions | |
GoldenPlaygroundTest () | |
~GoldenPlaygroundTest () override | |
void | SetUp () |
void | TearDown () |
PlaygroundBackend | GetBackend () const |
void | SetTypographerContext (std::shared_ptr< TypographerContext > typographer_context) |
bool | OpenPlaygroundHere (Picture picture) |
bool | OpenPlaygroundHere (AiksPlaygroundCallback callback) |
bool | OpenPlaygroundHere (const AiksDlPlaygroundCallback &callback) |
bool | OpenPlaygroundHere (const sk_sp< flutter::DisplayList > &list) |
std::unique_ptr< testing::Screenshot > | MakeScreenshot (const sk_sp< flutter::DisplayList > &list) |
std::shared_ptr< Texture > | CreateTextureForFixture (const char *fixture_name, bool enable_mipmapping=false) const |
sk_sp< flutter::DlImage > | CreateDlImageForFixture (const char *fixture_name, bool enable_mipmapping=false) const |
RuntimeStage::Map | OpenAssetAsRuntimeStage (const char *asset_name) const |
std::shared_ptr< Context > | GetContext () const |
std::shared_ptr< Context > | MakeContext () const |
Point | GetContentScale () const |
Scalar | GetSecondsElapsed () const |
ISize | GetWindowSize () const |
fml::Status | SetCapabilities (const std::shared_ptr< Capabilities > &capabilities) |
bool | WillRenderSomething () const |
Returns true if OpenPlaygroundHere will actually render anything. More... | |
Static Public Member Functions | |
static bool | SaveScreenshot (std::unique_ptr< testing::Screenshot > screenshot, const std::string &postfix="") |
static bool | ImGuiBegin (const char *name, bool *p_open, ImGuiWindowFlags flags) |
Protected Member Functions | |
void | SetWindowSize (ISize size) |
Definition at line 26 of file golden_playground_test.h.
using impeller::GoldenPlaygroundTest::AiksDlPlaygroundCallback = std::function<sk_sp<flutter::DisplayList>()> |
Definition at line 32 of file golden_playground_test.h.
using impeller::GoldenPlaygroundTest::AiksPlaygroundCallback = std::function<std::optional<Picture>(AiksContext& renderer)> |
Definition at line 29 of file golden_playground_test.h.
|
default |
Definition at line 122 of file golden_playground_test_mac.cc.
|
overridedefault |
sk_sp< flutter::DlImage > impeller::GoldenPlaygroundTest::CreateDlImageForFixture | ( | const char * | fixture_name, |
bool | enable_mipmapping = false |
||
) | const |
Definition at line 269 of file golden_playground_test_mac.cc.
References CreateTextureForFixture(), and impeller::DlImageImpeller::Make().
std::shared_ptr< Texture > impeller::GoldenPlaygroundTest::CreateTextureForFixture | ( | const char * | fixture_name, |
bool | enable_mipmapping = false |
||
) | const |
Definition at line 256 of file golden_playground_test_mac.cc.
References impeller::Playground::CreateTextureForMapping(), and GetContext().
Referenced by CreateDlImageForFixture().
PlaygroundBackend impeller::GoldenPlaygroundTest::GetBackend | ( | ) | const |
Definition at line 221 of file golden_playground_test_mac.cc.
Point impeller::GoldenPlaygroundTest::GetContentScale | ( | ) | const |
Definition at line 313 of file golden_playground_test_mac.cc.
std::shared_ptr< Context > impeller::GoldenPlaygroundTest::GetContext | ( | ) | const |
Definition at line 287 of file golden_playground_test_mac.cc.
Referenced by CreateTextureForFixture(), MakeContext(), MakeScreenshot(), OpenPlaygroundHere(), SetUp(), and TearDown().
Scalar impeller::GoldenPlaygroundTest::GetSecondsElapsed | ( | ) | const |
Definition at line 317 of file golden_playground_test_mac.cc.
ISize impeller::GoldenPlaygroundTest::GetWindowSize | ( | ) | const |
Definition at line 321 of file golden_playground_test_mac.cc.
|
static |
Definition at line 250 of file golden_playground_test_mac.cc.
std::shared_ptr< Context > impeller::GoldenPlaygroundTest::MakeContext | ( | ) | const |
On Metal we create a context for each test.
On OpenGL we create a context for each test.
Definition at line 294 of file golden_playground_test_mac.cc.
References GetContext(), impeller::kMetal, and impeller::kVulkan.
std::unique_ptr< testing::Screenshot > impeller::GoldenPlaygroundTest::MakeScreenshot | ( | const sk_sp< flutter::DisplayList > & | list | ) |
Definition at line 334 of file golden_playground_test_mac.cc.
References impeller::DisplayListToTexture(), GetContext(), impeller::TPoint< T >::x, and impeller::TPoint< T >::y.
RuntimeStage::Map impeller::GoldenPlaygroundTest::OpenAssetAsRuntimeStage | ( | const char * | asset_name | ) | const |
Definition at line 277 of file golden_playground_test_mac.cc.
References impeller::RuntimeStage::DecodeRuntimeStages().
bool impeller::GoldenPlaygroundTest::OpenPlaygroundHere | ( | AiksPlaygroundCallback | callback | ) |
bool impeller::GoldenPlaygroundTest::OpenPlaygroundHere | ( | const AiksDlPlaygroundCallback & | callback | ) |
Definition at line 225 of file golden_playground_test_mac.cc.
References impeller::DisplayListToTexture(), GetContext(), SaveScreenshot(), impeller::TPoint< T >::x, and impeller::TPoint< T >::y.
bool impeller::GoldenPlaygroundTest::OpenPlaygroundHere | ( | const sk_sp< flutter::DisplayList > & | list | ) |
Definition at line 245 of file golden_playground_test_mac.cc.
References OpenPlaygroundHere().
bool impeller::GoldenPlaygroundTest::OpenPlaygroundHere | ( | Picture | picture | ) |
Referenced by OpenPlaygroundHere().
|
static |
Definition at line 96 of file golden_playground_test_mac.cc.
References impeller::testing::GoldenDigest::AddImage(), impeller::testing::WorkingDirectory::GetFilenamePath(), impeller::testing::GoldenDigest::Instance(), and impeller::testing::WorkingDirectory::Instance().
Referenced by OpenPlaygroundHere().
fml::Status impeller::GoldenPlaygroundTest::SetCapabilities | ( | const std::shared_ptr< Capabilities > & | capabilities | ) |
Definition at line 329 of file golden_playground_test_mac.cc.
void impeller::GoldenPlaygroundTest::SetTypographerContext | ( | std::shared_ptr< TypographerContext > | typographer_context | ) |
Definition at line 128 of file golden_playground_test_mac.cc.
void impeller::GoldenPlaygroundTest::SetUp | ( | ) |
Definition at line 152 of file golden_playground_test_mac.cc.
References impeller::testing::GoldenDigest::AddDimension(), impeller::Flags::antialiased_lines, impeller::PlaygroundImpl::Create(), impeller::PlaygroundSwitches::enable_wide_gamut, impeller::PlaygroundSwitches::flags, GetContext(), impeller::testing::GoldenDigest::Instance(), impeller::kMetal, impeller::kOpenGLES, impeller::kSkipTests, impeller::kVulkan, and impeller::PlaygroundSwitches::use_angle.
|
protected |
Definition at line 71 of file golden_playground_test_stub.cc.
void impeller::GoldenPlaygroundTest::TearDown | ( | ) |
|
inline |
Returns true if OpenPlaygroundHere
will actually render anything.
Definition at line 89 of file golden_playground_test.h.