5 #include "flutter/fml/time/time_point.h"
16 [](
const char* message,
const char* file,
int line) ->
bool {
22 [message, file, line]() ->
void {
23 GTEST_MESSAGE_AT_(file, line,
"Impeller Validation Error",
24 ::testing::TestPartResult::kFatalFailure)
36 bool DoesSupportWideGamutTests() {
47 GTEST_SKIP() <<
"Playground doesn't support this backend type.";
52 GTEST_SKIP() <<
"Skipping due to user action.";
57 std::string test_name = flutter::testing::GetCurrentTestName();
60 test_name.find(
"WideGamut/") != std::string::npos;
63 !DoesSupportWideGamutTests())) {
64 GTEST_SKIP() <<
"This backend doesn't yet support wide gamut.";
82 std::string asset_name)
const {
83 return flutter::testing::OpenFixtureAsMapping(asset_name);
87 const char* asset_name)
const {
88 const std::shared_ptr<fml::Mapping> fixture =
89 flutter::testing::OpenFixtureAsMapping(asset_name);
90 if (!fixture || fixture->GetSize() == 0) {
98 std::stringstream stream;
99 stream <<
"Impeller Playground for '"
100 << flutter::testing::GetCurrentTestName() <<
"' ";
106 stream <<
" (Angle) ";
111 stream <<
" (SwiftShader) ";
115 stream <<
" (Press ESC to quit)";
120 bool PlaygroundTest::ShouldKeepRendering()
const {