5#include "flutter/fml/time/time_point.h"
19bool DoesSupportWideGamutTests() {
30 GTEST_SKIP_(
"Playground doesn't support this backend type.");
35 GTEST_SKIP_(
"Skipping due to user action.");
45 test_name.find(
"WideGamut/") != std::string::npos;
48 !DoesSupportWideGamutTests())) {
49 GTEST_SKIP_(
"This backend doesn't yet support wide gamut.");
67 std::string asset_name)
const {
72 const char* asset_name)
const {
73 const std::shared_ptr<fml::Mapping> fixture =
75 if (!fixture || fixture->GetSize() == 0) {
84 stream <<
"Impeller Playground for '"
96 stream <<
" (SwiftShader) ";
100 stream <<
" (Press ESC to quit)";
105bool PlaygroundTest::ShouldKeepRendering()
const {
std::unique_ptr< fml::Mapping > OpenAssetAsMapping(std::string asset_name) const override
std::string GetWindowTitle() const override
PlaygroundBackend GetBackend() const
virtual ~PlaygroundTest()
RuntimeStage::Map OpenAssetAsRuntimeStage(const char *asset_name) const
static bool ShouldOpenNewPlaygrounds()
void SetupContext(PlaygroundBackend backend, const PlaygroundSwitches &switches)
const PlaygroundSwitches switches_
static bool SupportsBackend(PlaygroundBackend backend)
Scalar GetSecondsElapsed() const
Get the amount of time elapsed from the start of the playground's execution.
std::map< RuntimeStageBackend, std::shared_ptr< RuntimeStage > > Map
static Map DecodeRuntimeStages(const std::shared_ptr< fml::Mapping > &payload)
std::string GetCurrentTestName()
Gets the name of the currently running test. This is useful in generating logs or assets based on tes...
std::unique_ptr< fml::Mapping > OpenFixtureAsMapping(const std::string &fixture_name)
Opens a fixture of the given file name and returns a mapping to its contents.
const fml::CommandLine & GetArgsForProcess()
std::chrono::duration< float > SecondsF
void ImpellerValidationErrorsSetFatal(bool fatal)
std::optional< std::chrono::milliseconds > timeout