[gtk/wip/otte/gl-hdr: 12/18] glcontext: Remove unused functionality
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/gl-hdr: 12/18] glcontext: Remove unused functionality
- Date: Wed, 6 Oct 2021 01:45:28 +0000 (UTC)
commit 03cc6030937f15b47f3fac86504c401dc9023552
Author: Benjamin Otte <otte redhat com>
Date: Wed Oct 6 01:32:22 2021 +0200
glcontext: Remove unused functionality
The recent changes made and unused function removals make these features
unused.
gdk/gdkglcontext.c | 62 ++---------------------------------------------
gdk/gdkglcontextprivate.h | 2 --
2 files changed, 2 insertions(+), 62 deletions(-)
---
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index 663d9f1d9c..04e21e5b0e 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -95,7 +95,6 @@ typedef struct {
int gl_version;
guint realized : 1;
- guint use_texture_rectangle : 1;
guint has_khr_debug : 1;
guint use_khr_debug : 1;
guint has_unpack_subimage : 1;
@@ -108,8 +107,6 @@ typedef struct {
int use_es;
int max_debug_label_length;
-
- GdkGLContextPaintData *paint_data;
} GdkGLContextPrivate;
enum {
@@ -170,16 +167,6 @@ gdk_gl_context_dispose (GObject *gobject)
G_OBJECT_CLASS (gdk_gl_context_parent_class)->dispose (gobject);
}
-static void
-gdk_gl_context_finalize (GObject *gobject)
-{
- GdkGLContext *context = GDK_GL_CONTEXT (gobject);
- GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
-
- g_clear_pointer (&priv->paint_data, g_free);
- G_OBJECT_CLASS (gdk_gl_context_parent_class)->finalize (gobject);
-}
-
static void
gdk_gl_context_set_property (GObject *gobject,
guint prop_id,
@@ -453,7 +440,6 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
gobject_class->set_property = gdk_gl_context_set_property;
gobject_class->get_property = gdk_gl_context_get_property;
gobject_class->dispose = gdk_gl_context_dispose;
- gobject_class->finalize = gdk_gl_context_finalize;
g_object_class_install_properties (gobject_class, LAST_PROP, obj_pspecs);
}
@@ -481,29 +467,6 @@ gdk_gl_context_new_for_surface (GdkSurface *surface)
NULL);
}
-GdkGLContextPaintData *
-gdk_gl_context_get_paint_data (GdkGLContext *context)
-{
- GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
-
- if (priv->paint_data == NULL)
- {
- priv->paint_data = g_new0 (GdkGLContextPaintData, 1);
- priv->paint_data->is_legacy = priv->is_legacy;
- priv->paint_data->use_es = priv->use_es;
- }
-
- return priv->paint_data;
-}
-
-gboolean
-gdk_gl_context_use_texture_rectangle (GdkGLContext *context)
-{
- GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
-
- return priv->use_texture_rectangle;
-}
-
void
gdk_gl_context_push_debug_group (GdkGLContext *context,
const char *message)
@@ -1066,7 +1029,6 @@ static void
gdk_gl_context_check_extensions (GdkGLContext *context)
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
- gboolean has_npot, has_texture_rectangle;
gboolean gl_debug = FALSE;
#ifdef G_ENABLE_DEBUG
GdkDisplay *display;
@@ -1105,17 +1067,11 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
if (priv->use_es)
{
- has_npot = priv->gl_version >= 20;
- has_texture_rectangle = FALSE;
-
priv->has_unpack_subimage = epoxy_has_gl_extension ("GL_EXT_unpack_subimage");
priv->has_khr_debug = epoxy_has_gl_extension ("GL_KHR_debug");
}
else
{
- has_npot = priv->gl_version >= 20 || epoxy_has_gl_extension ("GL_ARB_texture_non_power_of_two");
- has_texture_rectangle = priv->gl_version >= 31 || epoxy_has_gl_extension ("GL_ARB_texture_rectangle");
-
priv->has_unpack_subimage = TRUE;
priv->has_khr_debug = epoxy_has_gl_extension ("GL_KHR_debug");
@@ -1129,33 +1085,19 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
priv->use_khr_debug = TRUE;
glGetIntegerv (GL_MAX_LABEL_LENGTH, &priv->max_debug_label_length);
}
- if (!priv->use_es && GDK_DISPLAY_DEBUG_CHECK (gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context)),
GL_TEXTURE_RECT))
- priv->use_texture_rectangle = TRUE;
- else if (has_npot)
- priv->use_texture_rectangle = FALSE;
- else if (has_texture_rectangle)
- priv->use_texture_rectangle = TRUE;
- else
- g_warning ("GL implementation doesn't support any form of non-power-of-two textures");
GDK_DISPLAY_NOTE (gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context)), OPENGL,
g_message ("%s version: %d.%d (%s)\n"
"* GLSL version: %s\n"
"* Extensions checked:\n"
- " - GL_ARB_texture_non_power_of_two: %s\n"
- " - GL_ARB_texture_rectangle: %s\n"
" - GL_KHR_debug: %s\n"
- " - GL_EXT_unpack_subimage: %s\n"
- "* Using texture rectangle: %s",
+ " - GL_EXT_unpack_subimage: %s",
priv->use_es ? "OpenGL ES" : "OpenGL",
priv->gl_version / 10, priv->gl_version % 10,
priv->is_legacy ? "legacy" : "core",
glGetString (GL_SHADING_LANGUAGE_VERSION),
- has_npot ? "yes" : "no",
- has_texture_rectangle ? "yes" : "no",
priv->has_khr_debug ? "yes" : "no",
- priv->has_unpack_subimage ? "yes" : "no",
- priv->use_texture_rectangle ? "yes" : "no"));
+ priv->has_unpack_subimage ? "yes" : "no"));
priv->extensions_checked = TRUE;
}
diff --git a/gdk/gdkglcontextprivate.h b/gdk/gdkglcontextprivate.h
index 120e064e76..db7ab4ce9c 100644
--- a/gdk/gdkglcontextprivate.h
+++ b/gdk/gdkglcontextprivate.h
@@ -112,8 +112,6 @@ void gdk_gl_context_upload_texture (GdkGLContext
int stride,
GdkMemoryFormat data_format,
guint texture_target);
-GdkGLContextPaintData * gdk_gl_context_get_paint_data (GdkGLContext *context);
-gboolean gdk_gl_context_use_texture_rectangle (GdkGLContext *context);
gboolean gdk_gl_context_has_unpack_subimage (GdkGLContext *context);
void gdk_gl_context_push_debug_group (GdkGLContext *context,
const char *message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]