Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Request EGL in GLFW window creation #16924

Merged
merged 1 commit into from
Mar 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions shell/platform/glfw/flutter_glfw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ static FlutterDesktopWindowControllerState* GetSavedWindowState(
static UniqueGLFWwindowPtr CreateShareWindowForWindow(GLFWwindow* window) {
glfwWindowHint(GLFW_DECORATED, GLFW_FALSE);
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
#if defined(__linux__)
glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
#endif
GLFWwindow* share_window = glfwCreateWindow(1, 1, "", NULL, window);
glfwDefaultWindowHints();
return UniqueGLFWwindowPtr(share_window, glfwDestroyWindow);
Expand Down Expand Up @@ -561,6 +564,9 @@ FlutterDesktopWindowControllerRef FlutterDesktopCreateWindow(
if (window_properties.prevent_resize) {
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
}
#if defined(__linux__)
glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
#endif
state->window = UniqueGLFWwindowPtr(
glfwCreateWindow(window_properties.width, window_properties.height,
window_properties.title, NULL, NULL),
Expand Down