[gtk/drop-gl] gsk: Drop the gl renderer
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/drop-gl] gsk: Drop the gl renderer
- Date: Sat, 21 Aug 2021 02:52:07 +0000 (UTC)
commit 1f47e0825047abcd1773edc908bbd82aac1b48f7
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Aug 20 22:50:41 2021 -0400
gsk: Drop the gl renderer
ngl supports all the same platforms as gl
now, and has seen more improvements in the
last cycle.
demos/node-editor/node-editor-window.c | 6 +-
gsk/gl/glutilsprivate.h | 317 --
gsk/gl/gskgldriver.c | 849 -----
gsk/gl/gskgldriverprivate.h | 86 -
gsk/gl/gskglglyphcache.c | 397 ---
gsk/gl/gskglglyphcacheprivate.h | 92 -
gsk/gl/gskgliconcache.c | 275 --
gsk/gl/gskgliconcacheprivate.h | 44 -
gsk/gl/gskglimage.c | 64 -
gsk/gl/gskglimageprivate.h | 41 -
gsk/gl/gskglnodesample.c | 51 -
gsk/gl/gskglnodesampleprivate.h | 28 -
gsk/gl/gskglrenderer.c | 4559 -------------------------
gsk/gl/gskglrenderer.h | 52 -
gsk/gl/gskglrendererprivate.h | 14 -
gsk/gl/gskglrenderops.c | 976 ------
gsk/gl/gskglrenderopsprivate.h | 353 --
gsk/gl/gskglshaderbuilder.c | 271 --
gsk/gl/gskglshaderbuilderprivate.h | 42 -
gsk/gl/gskglshadowcache.c | 141 -
gsk/gl/gskglshadowcacheprivate.h | 31 -
gsk/gl/gskgltextureatlas.c | 309 --
gsk/gl/gskgltextureatlasprivate.h | 72 -
gsk/gl/opbuffer.c | 137 -
gsk/gl/opbuffer.h | 306 --
gsk/gl/resources/blend.glsl | 310 --
gsk/gl/resources/blit.glsl | 13 -
gsk/gl/resources/blur.glsl | 55 -
gsk/gl/resources/border.glsl | 40 -
gsk/gl/resources/color.glsl | 18 -
gsk/gl/resources/color_matrix.glsl | 25 -
gsk/gl/resources/coloring.glsl | 22 -
gsk/gl/resources/conic_gradient.glsl | 73 -
gsk/gl/resources/cross_fade.glsl | 20 -
gsk/gl/resources/custom.glsl | 21 -
gsk/gl/resources/inset_shadow.glsl | 41 -
gsk/gl/resources/linear_gradient.glsl | 95 -
gsk/gl/resources/outset_shadow.glsl | 33 -
gsk/gl/resources/preamble.fs.glsl | 139 -
gsk/gl/resources/preamble.glsl | 57 -
gsk/gl/resources/preamble.vs.glsl | 69 -
gsk/gl/resources/radial_gradient.glsl | 74 -
gsk/gl/resources/repeat.glsl | 41 -
gsk/gl/resources/unblurred_outset_shadow.glsl | 42 -
gsk/gskglshader.c | 5 +-
gsk/gskrenderer.c | 8 +-
gsk/meson.build | 37 +-
gsk/{gl => ngl}/gskglprofiler.c | 0
gsk/{gl => ngl}/gskglprofilerprivate.h | 0
gsk/{gl => ngl}/stb_rect_pack.c | 0
gsk/{gl => ngl}/stb_rect_pack.h | 0
51 files changed, 6 insertions(+), 10745 deletions(-)
---
diff --git a/demos/node-editor/node-editor-window.c b/demos/node-editor/node-editor-window.c
index ce4198d683..6250857ae6 100644
--- a/demos/node-editor/node-editor-window.c
+++ b/demos/node-editor/node-editor-window.c
@@ -24,7 +24,6 @@
#include "gtkrendererpaintableprivate.h"
#include "gsk/gskrendernodeparserprivate.h"
-#include "gsk/gl/gskglrenderer.h"
#include "gsk/ngl/gsknglrenderer.h"
#ifdef GDK_WINDOWING_BROADWAY
#include "gsk/broadway/gskbroadwayrenderer.h"
@@ -778,12 +777,9 @@ node_editor_window_realize (GtkWidget *widget)
NULL,
"Default");
#endif
- node_editor_window_add_renderer (self,
- gsk_gl_renderer_new (),
- "OpenGL");
node_editor_window_add_renderer (self,
gsk_ngl_renderer_new (),
- "NGL");
+ "OpenGL");
#ifdef GDK_RENDERING_VULKAN
node_editor_window_add_renderer (self,
gsk_vulkan_renderer_new (),
diff --git a/gsk/gskglshader.c b/gsk/gskglshader.c
index 996601d9c6..af6704a556 100644
--- a/gsk/gskglshader.c
+++ b/gsk/gskglshader.c
@@ -139,7 +139,6 @@
#include "gskglshaderprivate.h"
#include "gskdebugprivate.h"
-#include "gl/gskglrendererprivate.h"
#include "ngl/gsknglrendererprivate.h"
static GskGLUniformType
@@ -544,9 +543,7 @@ gsk_gl_shader_compile (GskGLShader *shader,
{
g_return_val_if_fail (GSK_IS_GL_SHADER (shader), FALSE);
- if (GSK_IS_GL_RENDERER (renderer))
- return gsk_gl_renderer_try_compile_gl_shader (GSK_GL_RENDERER (renderer), shader, error);
- else if (GSK_IS_NGL_RENDERER (renderer))
+ if (GSK_IS_NGL_RENDERER (renderer))
return gsk_ngl_renderer_try_compile_gl_shader (GSK_NGL_RENDERER (renderer), shader, error);
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
diff --git a/gsk/gskrenderer.c b/gsk/gskrenderer.c
index 082ec4c1e8..77fc9a0dfa 100644
--- a/gsk/gskrenderer.c
+++ b/gsk/gskrenderer.c
@@ -38,7 +38,6 @@
#include "gskcairorenderer.h"
#include "gskdebugprivate.h"
-#include "gl/gskglrenderer.h"
#include "ngl/gsknglrenderer.h"
#include "gskprofilerprivate.h"
#include "gskrendernodeprivate.h"
@@ -508,8 +507,6 @@ get_renderer_for_name (const char *renderer_name)
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;
@@ -520,12 +517,11 @@ get_renderer_for_name (const char *renderer_name)
#ifdef GDK_WINDOWING_BROADWAY
g_print ("broadway - Use the Broadway specific renderer\n");
#else
- g_print ("broadway - disabled during GTK build\n");
+ g_print ("broadway - Disabled during GTK build\n");
#endif
g_print (" cairo - Use the Cairo fallback renderer\n");
g_print (" opengl - Use the default OpenGL renderer\n");
- g_print (" gl - An OpenGL renderer\n");
- g_print (" ngl - Another OpenGL renderer\n");
+ g_print (" ngl - An OpenGL renderer\n");
#ifdef GDK_RENDERING_VULKAN
g_print (" vulkan - Use the Vulkan renderer\n");
#else
diff --git a/gsk/meson.build b/gsk/meson.build
index 7b82108286..20fd33185d 100644
--- a/gsk/meson.build
+++ b/gsk/meson.build
@@ -1,25 +1,3 @@
-gsk_private_gl_shaders = [
- 'gl/resources/preamble.glsl',
- 'gl/resources/preamble.fs.glsl',
- 'gl/resources/preamble.vs.glsl',
- 'gl/resources/border.glsl',
- 'gl/resources/blit.glsl',
- 'gl/resources/coloring.glsl',
- 'gl/resources/color.glsl',
- 'gl/resources/linear_gradient.glsl',
- 'gl/resources/radial_gradient.glsl',
- 'gl/resources/conic_gradient.glsl',
- 'gl/resources/color_matrix.glsl',
- 'gl/resources/blur.glsl',
- 'gl/resources/inset_shadow.glsl',
- 'gl/resources/outset_shadow.glsl',
- 'gl/resources/unblurred_outset_shadow.glsl',
- 'gl/resources/cross_fade.glsl',
- 'gl/resources/blend.glsl',
- 'gl/resources/repeat.glsl',
- 'gl/resources/custom.glsl',
-]
-
gsk_private_ngl_shaders = [
'ngl/resources/preamble.glsl',
'ngl/resources/preamble.fs.glsl',
@@ -53,7 +31,6 @@ gsk_public_sources = files([
'gskrendernodeparser.c',
'gskroundedrect.c',
'gsktransform.c',
- 'gl/gskglrenderer.c',
'ngl/gsknglrenderer.c',
])
@@ -62,16 +39,6 @@ gsk_private_sources = files([
'gskdebug.c',
'gskprivate.c',
'gskprofiler.c',
- 'gl/gskglshaderbuilder.c',
- 'gl/gskglprofiler.c',
- 'gl/gskglglyphcache.c',
- 'gl/gskgldriver.c',
- 'gl/gskglrenderops.c',
- 'gl/gskglshadowcache.c',
- 'gl/gskgltextureatlas.c',
- 'gl/gskgliconcache.c',
- 'gl/opbuffer.c',
- 'gl/stb_rect_pack.c',
'ngl/gsknglattachmentstate.c',
'ngl/gsknglbuffer.c',
'ngl/gsknglcommandqueue.c',
@@ -85,6 +52,8 @@ gsk_private_sources = files([
'ngl/gskngltexturelibrary.c',
'ngl/gskngluniformstate.c',
'ngl/gskngltexturepool.c',
+ 'ngl/gskglprofiler.c',
+ 'ngl/stb_rect_pack.c',
'ngl/fp16.c',
])
@@ -106,7 +75,6 @@ gsk_public_headers = files([
install_headers(gsk_public_headers, 'gsk.h', subdir: 'gtk-4.0/gsk')
gsk_public_gl_headers = files([
- 'gl/gskglrenderer.h',
'ngl/gsknglrenderer.h',
])
install_headers(gsk_public_gl_headers, subdir: 'gtk-4.0/gsk/gl')
@@ -177,7 +145,6 @@ gsk_resources_xml = configure_file(output: 'gsk.resources.xml',
command: [
find_program('gen-gsk-gresources-xml.py'),
'@OUTPUT@',
- gsk_private_gl_shaders,
gsk_private_ngl_shaders,
gsk_private_vulkan_compiled_shaders,
gsk_private_vulkan_shaders
diff --git a/gsk/gl/gskglprofiler.c b/gsk/ngl/gskglprofiler.c
similarity index 100%
rename from gsk/gl/gskglprofiler.c
rename to gsk/ngl/gskglprofiler.c
diff --git a/gsk/gl/gskglprofilerprivate.h b/gsk/ngl/gskglprofilerprivate.h
similarity index 100%
rename from gsk/gl/gskglprofilerprivate.h
rename to gsk/ngl/gskglprofilerprivate.h
diff --git a/gsk/gl/stb_rect_pack.c b/gsk/ngl/stb_rect_pack.c
similarity index 100%
rename from gsk/gl/stb_rect_pack.c
rename to gsk/ngl/stb_rect_pack.c
diff --git a/gsk/gl/stb_rect_pack.h b/gsk/ngl/stb_rect_pack.h
similarity index 100%
rename from gsk/gl/stb_rect_pack.h
rename to gsk/ngl/stb_rect_pack.h
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]