Make the OpenGL and OpenGL ES test windows invisible.

It's annoying to have four windows pop up during end2end test runs
(and potentially steal focus). It would be nice to hide them.

Bug: dawn:656

Change-Id: Ifcee65373e00d703bef308aecf1f85d696caa9dc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38640
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Stephen White 2021-01-27 17:22:44 +00:00 committed by Commit Bot service account
parent 95ff834028
commit eb7108c059
1 changed files with 3 additions and 0 deletions

View File

@ -362,6 +362,7 @@ std::unique_ptr<dawn_native::Instance> DawnTestEnvironment::CreateInstanceAndDis
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 4); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 4);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE); glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
mOpenGLWindow = glfwCreateWindow(400, 400, "Dawn OpenGL test window", nullptr, nullptr); mOpenGLWindow = glfwCreateWindow(400, 400, "Dawn OpenGL test window", nullptr, nullptr);
@ -375,6 +376,7 @@ std::unique_ptr<dawn_native::Instance> DawnTestEnvironment::CreateInstanceAndDis
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API); glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
mOpenGLESWindow = glfwCreateWindow(400, 400, "Dawn OpenGLES test window", nullptr, nullptr); mOpenGLESWindow = glfwCreateWindow(400, 400, "Dawn OpenGLES test window", nullptr, nullptr);
@ -382,6 +384,7 @@ std::unique_ptr<dawn_native::Instance> DawnTestEnvironment::CreateInstanceAndDis
dawn_native::opengl::AdapterDiscoveryOptionsES adapterOptionsES; dawn_native::opengl::AdapterDiscoveryOptionsES adapterOptionsES;
adapterOptionsES.getProc = adapterOptions.getProc; adapterOptionsES.getProc = adapterOptions.getProc;
instance->DiscoverAdapters(&adapterOptionsES); instance->DiscoverAdapters(&adapterOptionsES);
glfwWindowHint(GLFW_VISIBLE, GLFW_TRUE);
#endif // DAWN_ENABLE_BACKEND_OPENGL #endif // DAWN_ENABLE_BACKEND_OPENGL
return instance; return instance;