Remove 30fps cap from playgrounds (flutter/engine#38347)

This commit is contained in:
Brandon DeRosier
2022-12-16 10:34:34 -08:00
committed by GitHub
parent d361e6dc61
commit 5f1aeb0603
3 changed files with 4 additions and 6 deletions

View File

@@ -53,8 +53,7 @@ std::shared_ptr<RuntimeStage> 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();
}

View File

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

View File

@@ -54,8 +54,7 @@ std::shared_ptr<RuntimeStage> 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();
}