Merge branch 'ngl-by-default' into 'master'

gsk: Make ngl the default OpenGL renderer

See merge request GNOME/gtk!3313
This commit is contained in:
Matthias Clasen 2021-03-19 02:01:34 +00:00
commit 8fdedbd73b

View File

@ -505,11 +505,11 @@ get_renderer_for_name (const char *renderer_name)
#endif
else if (g_ascii_strcasecmp (renderer_name, "cairo") == 0)
return GSK_TYPE_CAIRO_RENDERER;
else if (g_ascii_strcasecmp (renderer_name, "opengl") == 0
|| g_ascii_strcasecmp (renderer_name, "gl") == 0)
return GSK_TYPE_GL_RENDERER;
else if (g_ascii_strcasecmp (renderer_name, "ngl") == 0)
else if (g_ascii_strcasecmp (renderer_name, "opengl") == 0 ||
g_ascii_strcasecmp (renderer_name, "ngl") == 0)
return GSK_TYPE_NGL_RENDERER;
else if (g_ascii_strcasecmp (renderer_name, "gl") == 0)
return GSK_TYPE_GL_RENDERER;
#ifdef GDK_RENDERING_VULKAN
else if (g_ascii_strcasecmp (renderer_name, "vulkan") == 0)
return GSK_TYPE_VULKAN_RENDERER;
@ -524,7 +524,7 @@ get_renderer_for_name (const char *renderer_name)
#endif
g_print (" cairo - Use the Cairo fallback renderer\n");
g_print (" opengl - Use the default OpenGL renderer\n");
g_print (" gl - Same as opengl\n");
g_print (" gl - An OpenGL renderer\n");
g_print (" ngl - Another OpenGL renderer\n");
#ifdef GDK_RENDERING_VULKAN
g_print (" vulkan - Use the Vulkan renderer\n");
@ -571,11 +571,11 @@ get_renderer_for_backend (GdkSurface *surface)
{
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_SURFACE (surface))
return GSK_TYPE_GL_RENDERER;
return GSK_TYPE_NGL_RENDERER;
#endif
#ifdef GDK_WINDOWING_WAYLAND
if (GDK_IS_WAYLAND_SURFACE (surface))
return GSK_TYPE_GL_RENDERER;
return GSK_TYPE_NGL_RENDERER;
#endif
#ifdef GDK_WINDOWING_BROADWAY
if (GDK_IS_BROADWAY_SURFACE (surface))
@ -583,7 +583,7 @@ get_renderer_for_backend (GdkSurface *surface)
#endif
#ifdef GDK_WINDOWING_MACOS
if (GDK_IS_MACOS_SURFACE (surface))
return GSK_TYPE_GL_RENDERER;
return GSK_TYPE_NGL_RENDERER;
#endif
#ifdef GDK_WINDOWING_WIN32
if (GDK_IS_WIN32_SURFACE (surface))
@ -593,7 +593,7 @@ get_renderer_for_backend (GdkSurface *surface)
if (!(GDK_DISPLAY_DEBUG_CHECK (display, GL_GLES) ||
GDK_WIN32_DISPLAY (display)->running_on_arm64))
return GSK_TYPE_GL_RENDERER;
return GSK_TYPE_NGL_RENDERER;
}
#endif