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:
Matthias Clasen 2018-01-12 20:38:26 -05:00
parent 08dc2cd6a8
commit 1d2606dc94
5 changed files with 4 additions and 17 deletions

View File

@ -156,8 +156,7 @@ static const GDebugKey gdk_debug_keys[] = {
{ "gl-gles", GDK_DEBUG_GL_GLES },
{ "vulkan-disable", GDK_DEBUG_VULKAN_DISABLE },
{ "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE },
{ "cairo-image", GDK_DEBUG_CAIRO_IMAGE },
{ "cairo-recording", GDK_DEBUG_CAIRO_RECORDING }
{ "cairo-image", GDK_DEBUG_CAIRO_IMAGE }
};
#endif

View File

@ -77,8 +77,7 @@ typedef enum {
GDK_DEBUG_GL_GLES = 1 << 16,
GDK_DEBUG_VULKAN_DISABLE = 1 << 17,
GDK_DEBUG_VULKAN_VALIDATE = 1 << 18,
GDK_DEBUG_CAIRO_IMAGE = 1 << 19,
GDK_DEBUG_CAIRO_RECORDING = 1 << 20
GDK_DEBUG_CAIRO_IMAGE = 1 << 19
} GdkDebugFlags;
extern GList *_gdk_default_filters;

View File

@ -5770,13 +5770,7 @@ gdk_window_create_similar_surface (GdkWindow * window,
sx = sy = 1;
cairo_surface_get_device_scale (window_surface, &sx, &sy);
if (GDK_DISPLAY_DEBUG_CHECK (window->display, CAIRO_RECORDING))
{
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))
if (GDK_DISPLAY_DEBUG_CHECK (window->display, CAIRO_IMAGE))
{
surface = cairo_image_surface_create (content == CAIRO_CONTENT_COLOR ? CAIRO_FORMAT_RGB24 :
content == CAIRO_CONTENT_ALPHA ? CAIRO_FORMAT_A8 : CAIRO_FORMAT_ARGB32,

View File

@ -788,8 +788,6 @@ init_rendering_mode (GtkInspectorVisual *vis)
if (flags & GDK_DEBUG_CAIRO_IMAGE)
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);
}
@ -803,11 +801,9 @@ rendering_mode_changed (GtkComboBox *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)
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);
}

View File

@ -466,7 +466,6 @@
<items>
<item translatable="yes" id="similar">Similar</item>
<item translatable="yes" id="image">Image</item>
<item translatable="yes" id="recording">Recording</item>
</items>
</object>
</child>