[gtk/ngl-by-default] gsk: Make ngl the default OpenGL renderer




commit f110cb938df7a63cb5087edc241cfab7845d7239
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Mar 17 23:27:41 2021 -0400

    gsk: Make ngl the default OpenGL renderer
    
    We will keep the original GL renderer around for
    a while, to have an alternative. But we want to
    get wider testing of the new renderer.

 gsk/gskrenderer.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gsk/gskrenderer.c b/gsk/gskrenderer.c
index ee63fb4a7e..f418bfabb2 100644
--- a/gsk/gskrenderer.c
+++ b/gsk/gskrenderer.c
@@ -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
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]