mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
Drop the cairo-recording debug flag
It is not very useful. The cairo-image option on the other hand is has been useful in tracking down problems in the past, so we'll keep it.
This commit is contained in:
parent
08dc2cd6a8
commit
1d2606dc94
@ -156,8 +156,7 @@ static const GDebugKey gdk_debug_keys[] = {
|
|||||||
{ "gl-gles", GDK_DEBUG_GL_GLES },
|
{ "gl-gles", GDK_DEBUG_GL_GLES },
|
||||||
{ "vulkan-disable", GDK_DEBUG_VULKAN_DISABLE },
|
{ "vulkan-disable", GDK_DEBUG_VULKAN_DISABLE },
|
||||||
{ "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE },
|
{ "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE },
|
||||||
{ "cairo-image", GDK_DEBUG_CAIRO_IMAGE },
|
{ "cairo-image", GDK_DEBUG_CAIRO_IMAGE }
|
||||||
{ "cairo-recording", GDK_DEBUG_CAIRO_RECORDING }
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -77,8 +77,7 @@ typedef enum {
|
|||||||
GDK_DEBUG_GL_GLES = 1 << 16,
|
GDK_DEBUG_GL_GLES = 1 << 16,
|
||||||
GDK_DEBUG_VULKAN_DISABLE = 1 << 17,
|
GDK_DEBUG_VULKAN_DISABLE = 1 << 17,
|
||||||
GDK_DEBUG_VULKAN_VALIDATE = 1 << 18,
|
GDK_DEBUG_VULKAN_VALIDATE = 1 << 18,
|
||||||
GDK_DEBUG_CAIRO_IMAGE = 1 << 19,
|
GDK_DEBUG_CAIRO_IMAGE = 1 << 19
|
||||||
GDK_DEBUG_CAIRO_RECORDING = 1 << 20
|
|
||||||
} GdkDebugFlags;
|
} GdkDebugFlags;
|
||||||
|
|
||||||
extern GList *_gdk_default_filters;
|
extern GList *_gdk_default_filters;
|
||||||
|
@ -5770,13 +5770,7 @@ gdk_window_create_similar_surface (GdkWindow * window,
|
|||||||
sx = sy = 1;
|
sx = sy = 1;
|
||||||
cairo_surface_get_device_scale (window_surface, &sx, &sy);
|
cairo_surface_get_device_scale (window_surface, &sx, &sy);
|
||||||
|
|
||||||
if (GDK_DISPLAY_DEBUG_CHECK (window->display, CAIRO_RECORDING))
|
if (GDK_DISPLAY_DEBUG_CHECK (window->display, CAIRO_IMAGE))
|
||||||
{
|
|
||||||
cairo_rectangle_t rect = { 0, 0, width * sx, height *sy };
|
|
||||||
surface = cairo_recording_surface_create (content, &rect);
|
|
||||||
cairo_surface_set_device_scale (surface, sx, sy);
|
|
||||||
}
|
|
||||||
else if (GDK_DISPLAY_DEBUG_CHECK (window->display, CAIRO_IMAGE))
|
|
||||||
{
|
{
|
||||||
surface = cairo_image_surface_create (content == CAIRO_CONTENT_COLOR ? CAIRO_FORMAT_RGB24 :
|
surface = cairo_image_surface_create (content == CAIRO_CONTENT_COLOR ? CAIRO_FORMAT_RGB24 :
|
||||||
content == CAIRO_CONTENT_ALPHA ? CAIRO_FORMAT_A8 : CAIRO_FORMAT_ARGB32,
|
content == CAIRO_CONTENT_ALPHA ? CAIRO_FORMAT_A8 : CAIRO_FORMAT_ARGB32,
|
||||||
|
@ -788,8 +788,6 @@ init_rendering_mode (GtkInspectorVisual *vis)
|
|||||||
|
|
||||||
if (flags & GDK_DEBUG_CAIRO_IMAGE)
|
if (flags & GDK_DEBUG_CAIRO_IMAGE)
|
||||||
mode = 1;
|
mode = 1;
|
||||||
else if (flags & GDK_DEBUG_CAIRO_RECORDING)
|
|
||||||
mode = 2;
|
|
||||||
|
|
||||||
gtk_combo_box_set_active (GTK_COMBO_BOX (vis->priv->rendering_mode_combo), mode);
|
gtk_combo_box_set_active (GTK_COMBO_BOX (vis->priv->rendering_mode_combo), mode);
|
||||||
}
|
}
|
||||||
@ -803,11 +801,9 @@ rendering_mode_changed (GtkComboBox *c,
|
|||||||
|
|
||||||
mode = gtk_combo_box_get_active (c);
|
mode = gtk_combo_box_get_active (c);
|
||||||
|
|
||||||
flags = flags & ~(GDK_DEBUG_CAIRO_IMAGE | GDK_DEBUG_CAIRO_RECORDING);
|
flags = flags & ~GDK_DEBUG_CAIRO_IMAGE;
|
||||||
if (mode == 1)
|
if (mode == 1)
|
||||||
flags = flags | GDK_DEBUG_CAIRO_IMAGE;
|
flags = flags | GDK_DEBUG_CAIRO_IMAGE;
|
||||||
else if (mode == 2)
|
|
||||||
flags = flags | GDK_DEBUG_CAIRO_RECORDING;
|
|
||||||
|
|
||||||
gdk_display_set_debug_flags (gdk_display_get_default (), flags);
|
gdk_display_set_debug_flags (gdk_display_get_default (), flags);
|
||||||
}
|
}
|
||||||
|
@ -466,7 +466,6 @@
|
|||||||
<items>
|
<items>
|
||||||
<item translatable="yes" id="similar">Similar</item>
|
<item translatable="yes" id="similar">Similar</item>
|
||||||
<item translatable="yes" id="image">Image</item>
|
<item translatable="yes" id="image">Image</item>
|
||||||
<item translatable="yes" id="recording">Recording</item>
|
|
||||||
</items>
|
</items>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
Loading…
Reference in New Issue
Block a user