#include <golden_playground_test.h>
|
static bool | ImGuiBegin (const char *name, bool *p_open, ImGuiWindowFlags flags) |
|
Definition at line 23 of file golden_playground_test.h.
◆ AiksPlaygroundCallback
◆ GoldenPlaygroundTest()
impeller::GoldenPlaygroundTest::GoldenPlaygroundTest |
( |
| ) |
|
|
default |
◆ ~GoldenPlaygroundTest()
impeller::GoldenPlaygroundTest::~GoldenPlaygroundTest |
( |
| ) |
|
|
overridedefault |
◆ CreateTextureForFixture()
std::shared_ptr< Texture > impeller::GoldenPlaygroundTest::CreateTextureForFixture |
( |
const char * |
fixture_name, |
|
|
bool |
enable_mipmapping = false |
|
) |
| const |
◆ GetBackend()
◆ GetContentScale()
Point impeller::GoldenPlaygroundTest::GetContentScale |
( |
| ) |
const |
◆ GetContext()
std::shared_ptr< Context > impeller::GoldenPlaygroundTest::GetContext |
( |
| ) |
const |
◆ GetSecondsElapsed()
Scalar impeller::GoldenPlaygroundTest::GetSecondsElapsed |
( |
| ) |
const |
◆ GetWindowSize()
ISize impeller::GoldenPlaygroundTest::GetWindowSize |
( |
| ) |
const |
◆ ImGuiBegin()
bool impeller::GoldenPlaygroundTest::ImGuiBegin |
( |
const char * |
name, |
|
|
bool * |
p_open, |
|
|
ImGuiWindowFlags |
flags |
|
) |
| |
|
static |
◆ MakeContext()
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 248 of file golden_playground_test_mac.cc.
253 bool enable_vulkan_validations =
true;
254 FML_CHECK(!pimpl_->test_vulkan_playground)
255 <<
"We don't support creating multiple contexts for one test";
256 pimpl_->test_vulkan_playground =
257 MakeVulkanPlayground(enable_vulkan_validations);
258 pimpl_->screenshotter = std::make_unique<testing::VulkanScreenshotter>(
259 pimpl_->test_vulkan_playground);
260 return pimpl_->test_vulkan_playground->GetContext();
References GetContext(), impeller::kMetal, and impeller::kVulkan.
◆ OpenAssetAsRuntimeStage()
RuntimeStage::Map impeller::GoldenPlaygroundTest::OpenAssetAsRuntimeStage |
( |
const char * |
asset_name | ) |
const |
◆ OpenPlaygroundHere() [1/2]
Definition at line 196 of file golden_playground_test_mac.cc.
199 AiksContext renderer(
GetContext(), typographer_context_);
201 std::optional<Picture> picture;
202 std::unique_ptr<testing::Screenshot> screenshot;
203 for (
int i = 0; i < 2; ++i) {
204 picture = callback(renderer);
205 if (!picture.has_value()) {
208 screenshot = pimpl_->screenshotter->MakeScreenshot(
209 renderer, picture.value(), pimpl_->window_size);
212 return SaveScreenshot(std::move(screenshot));
References GetContext().
◆ OpenPlaygroundHere() [2/2]
bool impeller::GoldenPlaygroundTest::OpenPlaygroundHere |
( |
Picture |
picture | ) |
|
Definition at line 188 of file golden_playground_test_mac.cc.
189 AiksContext renderer(
GetContext(), typographer_context_);
191 auto screenshot = pimpl_->screenshotter->MakeScreenshot(renderer, picture,
192 pimpl_->window_size);
193 return SaveScreenshot(std::move(screenshot));
References GetContext().
◆ SetCapabilities()
fml::Status impeller::GoldenPlaygroundTest::SetCapabilities |
( |
const std::shared_ptr< Capabilities > & |
capabilities | ) |
|
◆ SetTypographerContext()
void impeller::GoldenPlaygroundTest::SetTypographerContext |
( |
std::shared_ptr< TypographerContext > |
typographer_context | ) |
|
◆ SetUp()
void impeller::GoldenPlaygroundTest::SetUp |
( |
| ) |
|
Definition at line 131 of file golden_playground_test_mac.cc.
132 std::filesystem::path testing_assets_path =
133 flutter::testing::GetTestingAssetsPath();
134 std::filesystem::path target_path = testing_assets_path.parent_path()
138 std::filesystem::path icd_path = target_path /
"vk_swiftshader_icd.json";
139 setenv(
"VK_ICD_FILENAMES", icd_path.c_str(), 1);
141 switch (GetParam()) {
143 pimpl_->screenshotter = std::make_unique<testing::MetalScreenshotter>();
146 const std::unique_ptr<PlaygroundImpl>& playground =
147 GetSharedVulkanPlayground(
true);
148 pimpl_->screenshotter =
149 std::make_unique<testing::VulkanScreenshotter>(playground);
153 FML_CHECK(::glfwInit() == GLFW_TRUE);
154 PlaygroundSwitches playground_switches;
155 playground_switches.use_angle =
true;
158 pimpl_->screenshotter = std::make_unique<testing::VulkanScreenshotter>(
159 pimpl_->test_opengl_playground);
164 pimpl_->screenshotter = std::make_unique<testing::MetalScreenshotter>();
166 const std::unique_ptr<PlaygroundImpl>& playground =
167 GetSharedVulkanPlayground(
true);
168 pimpl_->screenshotter =
169 std::make_unique<testing::VulkanScreenshotter>(playground);
172 std::string test_name = GetTestName();
176 "GoldenPlaygroundTest doesn't support interactive playground tests "
181 "gpu_string",
GetContext()->DescribeGpuModel());
References impeller::testing::GoldenDigest::AddDimension(), impeller::PlaygroundImpl::Create(), GetContext(), impeller::testing::GoldenDigest::Instance(), impeller::kMetal, impeller::kOpenGLES, impeller::kSkipTests, impeller::kVulkan, and impeller::PlaygroundSwitches::use_angle.
◆ SetWindowSize()
void impeller::GoldenPlaygroundTest::SetWindowSize |
( |
ISize |
size | ) |
|
|
protected |
◆ TearDown()
void impeller::GoldenPlaygroundTest::TearDown |
( |
| ) |
|
◆ WillRenderSomething()
bool impeller::GoldenPlaygroundTest::WillRenderSomething |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: