backends: Promote g_debug() MetaStageImpl message to meta_topic()

We now have a META_DEBUG_BACKEND topic that can suit this bag of
assorted debug messages. Assign it to these, instead of plain
G_MESSAGES_DEBUG=mutter.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862>
This commit is contained in:
Carlos Garnacho 2021-07-16 19:12:01 +02:00
parent c80ef12c79
commit 414302fa82

View File

@ -65,7 +65,7 @@ enum
static void
meta_stage_impl_unrealize (ClutterStageWindow *stage_window)
{
g_debug ("Unrealizing Cogl stage [%p]", stage_window);
meta_topic (META_DEBUG_BACKEND, "Unrealizing Cogl stage [%p]", stage_window);
}
static gboolean
@ -73,7 +73,8 @@ meta_stage_impl_realize (ClutterStageWindow *stage_window)
{
ClutterBackend *backend;
g_debug ("Realizing stage '%s' [%p]",
meta_topic (META_DEBUG_BACKEND,
"Realizing stage '%s' [%p]",
G_OBJECT_TYPE_NAME (stage_window),
stage_window);
@ -239,7 +240,9 @@ swap_framebuffer (ClutterStageWindow *stage_window,
/* push on the screen */
if (n_rects > 0 && !swap_with_damage)
{
g_debug ("cogl_onscreen_swap_region (onscreen: %p)", onscreen);
meta_topic (META_DEBUG_BACKEND,
"cogl_onscreen_swap_region (onscreen: %p)",
onscreen);
cogl_onscreen_swap_region (onscreen,
damage, n_rects,
@ -248,7 +251,9 @@ swap_framebuffer (ClutterStageWindow *stage_window,
}
else
{
g_debug ("cogl_onscreen_swap_buffers (onscreen: %p)", onscreen);
meta_topic (META_DEBUG_BACKEND,
"cogl_onscreen_swap_buffers (onscreen: %p)",
onscreen);
cogl_onscreen_swap_buffers_with_damage (onscreen,
damage, n_rects,
@ -260,7 +265,9 @@ swap_framebuffer (ClutterStageWindow *stage_window,
{
MetaStageView *view = META_STAGE_VIEW (stage_view);
g_debug ("fake offscreen swap (framebuffer: %p)", framebuffer);
meta_topic (META_DEBUG_BACKEND,
"fake offscreen swap (framebuffer: %p)",
framebuffer);
meta_stage_view_perform_fake_swap (view, priv->global_frame_counter);
priv->global_frame_counter++;
}
@ -433,7 +440,8 @@ meta_stage_impl_redraw_view_primary (MetaStageImpl *stage_impl,
buffer_age = cogl_onscreen_get_buffer_age (COGL_ONSCREEN (onscreen));
if (!clutter_damage_history_is_age_valid (damage_history, buffer_age))
{
g_debug ("Invalid back buffer(age=%d): forcing full redraw",
meta_topic (META_DEBUG_BACKEND,
"Invalid back buffer(age=%d): forcing full redraw",
buffer_age);
use_clipped_redraw = FALSE;
}
@ -504,7 +512,8 @@ meta_stage_impl_redraw_view_primary (MetaStageImpl *stage_impl,
cairo_region_union (fb_clip_region, old_damage);
}
g_debug ("Reusing back buffer(age=%d) - repairing region: num rects: %d",
meta_topic (META_DEBUG_BACKEND,
"Reusing back buffer(age=%d) - repairing region: num rects: %d",
buffer_age,
cairo_region_num_rectangles (fb_clip_region));
@ -549,7 +558,7 @@ meta_stage_impl_redraw_view_primary (MetaStageImpl *stage_impl,
}
else
{
g_debug ("Unclipped stage paint");
meta_topic (META_DEBUG_BACKEND, "Unclipped stage paint");
paint_stage (stage_impl, stage_view, redraw_clip);
}