Merge branch 'fix-wgl-cairo-fallback' into 'master'
Apply MR !3964 to master (fix WGL->Cairo fallback-related items) Closes #4257 See merge request GNOME/gtk!3987
This commit is contained in:
@@ -1150,6 +1150,8 @@ static gboolean
|
||||
gdk_win32_display_init_gl_backend (GdkDisplay *display,
|
||||
GError **error)
|
||||
{
|
||||
gboolean result = FALSE;
|
||||
|
||||
#ifdef GDK_WIN32_ENABLE_EGL
|
||||
if (GDK_DISPLAY_DEBUG_CHECK (display, GL_EGL))
|
||||
return gdk_win32_display_init_egl (display, error);
|
||||
@@ -1161,17 +1163,17 @@ gdk_win32_display_init_gl_backend (GdkDisplay *display,
|
||||
* as WGL is the more tried-and-tested configuration.
|
||||
*/
|
||||
|
||||
if (gdk_win32_display_init_wgl (display, error))
|
||||
return TRUE;
|
||||
g_clear_error (error);
|
||||
result = gdk_win32_display_init_wgl (display, error);
|
||||
|
||||
#ifdef GDK_WIN32_ENABLE_EGL
|
||||
if (gdk_win32_display_init_egl (display, error))
|
||||
return TRUE;
|
||||
if (!result)
|
||||
{
|
||||
g_clear_error (error);
|
||||
result = gdk_win32_display_init_egl (display, error);
|
||||
}
|
||||
#endif
|
||||
g_clear_error (error);
|
||||
|
||||
return gdk_win32_display_init_wgl (display, error);
|
||||
return result;
|
||||
}
|
||||
|
||||
static GdkGLContext *
|
||||
|
||||
@@ -283,7 +283,6 @@ gdk_win32_display_init_wgl (GdkDisplay *display,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
display_win32->wgl_pixel_format = best_idx;
|
||||
display_win32->gl_version = epoxy_gl_version ();
|
||||
|
||||
/* We must have OpenGL/WGL 2.0 or later, or have the GL_ARB_shader_objects extension */
|
||||
@@ -302,6 +301,8 @@ gdk_win32_display_init_wgl (GdkDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
display_win32->wgl_pixel_format = best_idx;
|
||||
|
||||
display_win32->hasWglARBCreateContext =
|
||||
epoxy_has_wgl_extension (hdc, "WGL_ARB_create_context");
|
||||
display_win32->hasWglEXTSwapControl =
|
||||
|
||||
Reference in New Issue
Block a user