From 5f1aeb060352d318645a12338de27c2b03560159 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Fri, 16 Dec 2022 10:34:34 -0800 Subject: [PATCH] Remove 30fps cap from playgrounds (flutter/engine#38347) --- .../flutter/impeller/playground/compute_playground_test.cc | 3 +-- engine/src/flutter/impeller/playground/playground.cc | 4 ++-- engine/src/flutter/impeller/playground/playground_test.cc | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/engine/src/flutter/impeller/playground/compute_playground_test.cc b/engine/src/flutter/impeller/playground/compute_playground_test.cc index 8405bb6687..fce9088ddd 100644 --- a/engine/src/flutter/impeller/playground/compute_playground_test.cc +++ b/engine/src/flutter/impeller/playground/compute_playground_test.cc @@ -53,8 +53,7 @@ std::shared_ptr ComputePlaygroundTest::OpenAssetAsRuntimeStage( static std::string FormatWindowTitle(const std::string& test_name) { std::stringstream stream; - stream << "Impeller Playground for '" << test_name - << "' (Press ESC or 'q' to quit)"; + stream << "Impeller Playground for '" << test_name << "' (Press ESC to quit)"; return stream.str(); } diff --git a/engine/src/flutter/impeller/playground/playground.cc b/engine/src/flutter/impeller/playground/playground.cc index bc7137ae1e..e402568592 100644 --- a/engine/src/flutter/impeller/playground/playground.cc +++ b/engine/src/flutter/impeller/playground/playground.cc @@ -145,7 +145,7 @@ static void PlaygroundKeyCallback(GLFWwindow* window, int scancode, int action, int mods) { - if ((key == GLFW_KEY_ESCAPE || key == GLFW_KEY_Q) && action == GLFW_RELEASE) { + if ((key == GLFW_KEY_ESCAPE) && action == GLFW_RELEASE) { if (mods & (GLFW_MOD_CONTROL | GLFW_MOD_SUPER | GLFW_MOD_SHIFT)) { gShouldOpenNewPlaygrounds = false; } @@ -227,7 +227,7 @@ bool Playground::OpenPlaygroundHere( ::glfwShowWindow(window); while (true) { - ::glfwWaitEventsTimeout(1.0 / 30.0); + ::glfwPollEvents(); if (::glfwWindowShouldClose(window)) { return true; diff --git a/engine/src/flutter/impeller/playground/playground_test.cc b/engine/src/flutter/impeller/playground/playground_test.cc index c34b30d63f..6773e22a08 100644 --- a/engine/src/flutter/impeller/playground/playground_test.cc +++ b/engine/src/flutter/impeller/playground/playground_test.cc @@ -54,8 +54,7 @@ std::shared_ptr PlaygroundTest::OpenAssetAsRuntimeStage( static std::string FormatWindowTitle(const std::string& test_name) { std::stringstream stream; - stream << "Impeller Playground for '" << test_name - << "' (Press ESC or 'q' to quit)"; + stream << "Impeller Playground for '" << test_name << "' (Press ESC to quit)"; return stream.str(); }