[gtk/debug-envvars-cleanup: 8/16] Drop the software-gl debug flag
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/debug-envvars-cleanup: 8/16] Drop the software-gl debug flag
- Date: Thu, 22 Sep 2022 02:01:54 +0000 (UTC)
commit 1987398ec577a8ff6729e7f7e37bdc1213fbd3bf
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Sep 21 21:03:40 2022 -0400
Drop the software-gl debug flag
This was not doing anything.
gdk/gdk.c | 1 -
gdk/gdkdebug.h | 1 -
gtk/inspector/visual.c | 43 -------------------------------------------
gtk/inspector/visual.ui | 26 --------------------------
4 files changed, 71 deletions(-)
---
diff --git a/gdk/gdk.c b/gdk/gdk.c
index 46d02841cc..ed401bdd95 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -119,7 +119,6 @@ static const GdkDebugKey gdk_debug_keys[] = {
{ "nograbs", GDK_DEBUG_NOGRABS, "Disable pointer and keyboard grabs (X11)", TRUE },
{ "portals", GDK_DEBUG_PORTALS, "Force the use of portals", TRUE },
{ "gl-disable", GDK_DEBUG_GL_DISABLE, "Disable OpenGL support", TRUE },
- { "gl-software", GDK_DEBUG_GL_SOFTWARE, "Force OpenGL software rendering" },
{ "gl-texture-rect", GDK_DEBUG_GL_TEXTURE_RECT, "Use OpenGL texture rectangle extension" },
{ "gl-legacy", GDK_DEBUG_GL_LEGACY, "Use a legacy OpenGL context" },
{ "gl-gles", GDK_DEBUG_GL_GLES, "Only allow OpenGL GLES API" },
diff --git a/gdk/gdkdebug.h b/gdk/gdkdebug.h
index 34499edc95..597c4bdfc6 100644
--- a/gdk/gdkdebug.h
+++ b/gdk/gdkdebug.h
@@ -40,7 +40,6 @@ typedef enum {
GDK_DEBUG_NOGRABS = 1 << 11,
GDK_DEBUG_PORTALS = 1 << 12,
GDK_DEBUG_GL_DISABLE = 1 << 13,
- GDK_DEBUG_GL_SOFTWARE = 1 << 14,
GDK_DEBUG_GL_TEXTURE_RECT = 1 << 15,
GDK_DEBUG_GL_LEGACY = 1 << 16,
GDK_DEBUG_GL_GLES = 1 << 17,
diff --git a/gtk/inspector/visual.c b/gtk/inspector/visual.c
index 19ac88b4ef..4d1cc9c7cc 100644
--- a/gtk/inspector/visual.c
+++ b/gtk/inspector/visual.c
@@ -97,7 +97,6 @@ struct _GtkInspectorVisual
GtkWidget *misc_box;
GtkWidget *touchscreen_switch;
- GtkWidget *software_gl_switch;
GtkInspectorOverlay *fps_overlay;
GtkInspectorOverlay *updates_overlay;
@@ -1021,51 +1020,11 @@ row_activated (GtkListBox *box,
GtkSwitch *sw = GTK_SWITCH (vis->touchscreen_switch);
gtk_switch_set_active (sw, !gtk_switch_get_active (sw));
}
- else if (gtk_widget_is_ancestor (vis->software_gl_switch, GTK_WIDGET (row)))
- {
- GtkSwitch *sw = GTK_SWITCH (vis->software_gl_switch);
- gtk_switch_set_active (sw, !gtk_switch_get_active (sw));
- }
}
static void
init_gl (GtkInspectorVisual *vis)
{
- GdkDebugFlags flags = gdk_display_get_debug_flags (vis->display);
-
- gtk_switch_set_active (GTK_SWITCH (vis->software_gl_switch), flags & GDK_DEBUG_GL_SOFTWARE);
-
- if (flags & GDK_DEBUG_GL_DISABLE)
- {
- GtkWidget *row;
-
- gtk_widget_set_sensitive (vis->software_gl_switch, FALSE);
- row = gtk_widget_get_ancestor (vis->software_gl_switch, GTK_TYPE_LIST_BOX_ROW);
- gtk_widget_set_tooltip_text (row, _("GL rendering is disabled"));
- }
-}
-
-static void
-update_gl_flag (GtkSwitch *sw,
- GdkDebugFlags flag,
- GtkInspectorVisual *vis)
-{
- GdkDebugFlags flags = gdk_display_get_debug_flags (vis->display);
-
- if (gtk_switch_get_active (sw))
- flags |= flag;
- else
- flags &= ~flag;
-
- gdk_display_set_debug_flags (vis->display, flags);
-}
-
-static void
-software_gl_activate (GtkSwitch *sw,
- GParamSpec *pspec,
- GtkInspectorVisual *vis)
-{
- update_gl_flag (sw, GDK_DEBUG_GL_SOFTWARE, vis);
}
static void
@@ -1170,7 +1129,6 @@ gtk_inspector_visual_class_init (GtkInspectorVisualClass *klass)
gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, debug_box);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, font_button);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, misc_box);
- gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, software_gl_switch);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, font_scale_entry);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, font_scale_adjustment);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorVisual, fps_switch);
@@ -1187,7 +1145,6 @@ gtk_inspector_visual_class_init (GtkInspectorVisualClass *klass)
gtk_widget_class_bind_template_callback (widget_class, baselines_activate);
gtk_widget_class_bind_template_callback (widget_class, layout_activate);
gtk_widget_class_bind_template_callback (widget_class, focus_activate);
- gtk_widget_class_bind_template_callback (widget_class, software_gl_activate);
gtk_widget_class_bind_template_callback (widget_class, inspect_inspector);
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
diff --git a/gtk/inspector/visual.ui b/gtk/inspector/visual.ui
index 2915a3685d..e125449bab 100644
--- a/gtk/inspector/visual.ui
+++ b/gtk/inspector/visual.ui
@@ -668,31 +668,6 @@
</child>
</object>
</child>
- <child>
- <object class="GtkListBoxRow">
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="software_gl_label">
- <property name="label" translatable="yes">Software GL</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkSwitch" id="software_gl_switch">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- <signal name="notify::active" handler="software_gl_activate"/>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
</object>
</child>
</object>
@@ -747,7 +722,6 @@
<widget name="layout_label_box"/>
<widget name="focus_label"/>
<widget name="touchscreen_label"/>
- <widget name="software_gl_label"/>
</widgets>
</object>
<object class="GtkSizeGroup">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]