Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Specify if Angle or SwiftShader is being used in the title. #50376

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions impeller/playground/playground_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,27 @@ RuntimeStage::Map PlaygroundTest::OpenAssetAsRuntimeStage(
return RuntimeStage::DecodeRuntimeStages(fixture);
}

static std::string FormatWindowTitle(const std::string& test_name) {
std::stringstream stream;
stream << "Impeller Playground for '" << test_name << "' (Press ESC to quit)";
return stream.str();
}

// |Playground|
std::string PlaygroundTest::GetWindowTitle() const {
return FormatWindowTitle(flutter::testing::GetCurrentTestName());
std::stringstream stream;
stream << "Impeller Playground for '"
<< flutter::testing::GetCurrentTestName() << "' ";
switch (GetBackend()) {
case PlaygroundBackend::kMetal:
break;
case PlaygroundBackend::kOpenGLES:
if (switches_.use_angle) {
stream << " (Angle) ";
}
break;
case PlaygroundBackend::kVulkan:
if (switches_.use_swiftshader) {
stream << " (SwiftShader) ";
}
break;
}
stream << " (Press ESC to quit)";
return stream.str();
}

// |Playground|
Expand Down