Drop the software-gl debug flag

This was not doing anything.
This commit is contained in:
Matthias Clasen 2022-09-21 21:03:40 -04:00
parent fa0fc9acb8
commit 1987398ec5
4 changed files with 0 additions and 71 deletions

View File

@ -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" },

View File

@ -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,

View File

@ -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);

View File

@ -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">