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);
67 const sk_sp<flutter::DisplayList>& list);
69 static bool SaveScreenshot(std::unique_ptr<testing::Screenshot> screenshot,
70 const std::string& postfix =
"");
73 const char* fixture_name,
74 bool enable_mipmapping =
false)
const;
77 const char* fixture_name,
78 bool enable_mipmapping =
false)
const;
81 const char* asset_name)
const;
96 const std::shared_ptr<Capabilities>& capabilities);
145 std::shared_ptr<TypographerContext> typographer_context_;
147 struct GoldenPlaygroundTestImpl;
149 std::shared_ptr<GoldenPlaygroundTestImpl> pimpl_;
bool OpenPlaygroundHere(AiksPlaygroundCallback callback)
IRect GetWindowBounds() const
void EnsureContextIsUnique()
PlaygroundBackend GetBackend() const
ISize GetWindowSize() const
bool EnsureContextSupportsWideGamut()
RuntimeStageBackend GetRuntimeStageBackend() 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
void SetEnableWriteGolden(bool write_golden)
Sets a particular test to either write a golden or not.
bool RenderingSupportsMSAA() const
Returns true if the rendering path supports MSAA rendering.
static bool SaveScreenshot(std::unique_ptr< testing::Screenshot > screenshot, const std::string &postfix="")
bool InitializePipelineDescriptorForRendering(PipelineDescriptor &desc) const
Initializes the provided |PipelineDescriptor| with appropriate default values to match the conditions...
std::unique_ptr< testing::Screenshot > MakeScreenshot(const sk_sp< flutter::DisplayList > &list)
Scalar GetSecondsElapsed() const
bool IsPlaygroundEnabled() const
bool OpenPlaygroundHere(Picture picture)
std::function< sk_sp< flutter::DisplayList >()> AiksDlPlaygroundCallback
SampleCount GetDefaultSampleCount() const
Returns the default sample count of the rendering path.
~GoldenPlaygroundTest() override
absl::StatusOr< RuntimeStage::Map > OpenAssetAsRuntimeStage(const char *asset_name) const
std::shared_ptr< Context > GetContext() const
void SetWindowSize(ISize size)
std::shared_ptr< Texture > CreateTextureForFixture(const char *fixture_name, bool enable_mipmapping=false) const
std::function< bool(RenderPass &pass)> SinglePassCallback
FlutterDesktopBinaryReply callback