[Impeller] Specify if Angle or SwiftShader is being used in the title. (flutter/engine#50376)

Minor QOL improvement. Tried taking a frame capture unsuccessfully before realizing that I was using SwiftShader.
This commit is contained in:
Chinmay Garde
2024-02-06 09:33:45 -08:00
committed by GitHub
parent 5d1cc934ad
commit 9d32cac3ed

View File

@@ -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|