From 3f5ea279ef0ed3bb413a7c55e37466bf52d313fe Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 5 Feb 2024 15:36:41 -0800 Subject: [PATCH] [Impeller] Specify if Angle of SwiftShader is being used in the title. --- impeller/playground/playground_test.cc | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/impeller/playground/playground_test.cc b/impeller/playground/playground_test.cc index d9439dacc2a7c..676c3b0412992 100644 --- a/impeller/playground/playground_test.cc +++ b/impeller/playground/playground_test.cc @@ -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|