5#ifndef FLUTTER_IMPELLER_GOLDEN_TESTS_GOLDEN_PLAYGROUND_TEST_H_
6#define FLUTTER_IMPELLER_GOLDEN_TESTS_GOLDEN_PLAYGROUND_TEST_H_
18#include "third_party/abseil-cpp/absl/status/statusor.h"
19#include "third_party/imgui/imgui.h"
28 :
public ::testing::TestWithParam<PlaygroundBackend> {
31 std::function<std::optional<Picture>(
AiksContext& renderer)>;
46 std::shared_ptr<TypographerContext> typographer_context);
57 const sk_sp<flutter::DisplayList>& list);
59 static bool SaveScreenshot(std::unique_ptr<testing::Screenshot> screenshot,
60 const std::string& postfix =
"");
64 ImGuiWindowFlags flags);
67 const char* fixture_name,
68 bool enable_mipmapping =
false)
const;
71 const char* fixture_name,
72 bool enable_mipmapping =
false)
const;
75 const char* asset_name)
const;
88 const std::shared_ptr<Capabilities>& capabilities);
103 std::shared_ptr<TypographerContext> typographer_context_;
105 struct GoldenPlaygroundTestImpl;
107 std::shared_ptr<GoldenPlaygroundTestImpl> pimpl_;
bool OpenPlaygroundHere(AiksPlaygroundCallback callback)
PlaygroundBackend GetBackend() const
ISize GetWindowSize() const
std::function< std::optional< Picture >(AiksContext &renderer)> AiksPlaygroundCallback
sk_sp< flutter::DlImage > CreateDlImageForFixture(const char *fixture_name, bool enable_mipmapping=false) const
Point GetContentScale() const
fml::Status SetCapabilities(const std::shared_ptr< Capabilities > &capabilities)
void SetTypographerContext(std::shared_ptr< TypographerContext > typographer_context)
std::shared_ptr< Context > MakeContext() const
static bool SaveScreenshot(std::unique_ptr< testing::Screenshot > screenshot, const std::string &postfix="")
std::unique_ptr< testing::Screenshot > MakeScreenshot(const sk_sp< flutter::DisplayList > &list)
Scalar GetSecondsElapsed() const
bool OpenPlaygroundHere(Picture picture)
static bool ImGuiBegin(const char *name, bool *p_open, ImGuiWindowFlags flags)
std::function< sk_sp< flutter::DisplayList >()> AiksDlPlaygroundCallback
~GoldenPlaygroundTest() override
absl::StatusOr< RuntimeStage::Map > OpenAssetAsRuntimeStage(const char *asset_name) const
std::shared_ptr< Context > GetContext() const
void SetWindowSize(ISize size)
bool WillRenderSomething() const
Returns true if OpenPlaygroundHere will actually render anything.
std::shared_ptr< Texture > CreateTextureForFixture(const char *fixture_name, bool enable_mipmapping=false) const
FlutterDesktopBinaryReply callback