1
0
Fork 0

cogl/trace: Make COGL_TRACE_DESCRIBE append

Sometimes it's useful to combine the description from multiple places.
For example, a subsequent commit will add the output name as the first
thing to the frame clock span descriptions, leaving the rest of the
description with complex checks unchanged.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3417>
This commit is contained in:
Ivan Molodetskikh 2023-11-23 08:14:42 +04:00 committed by Marge Bot
parent 521668202d
commit bed42454d3

View file

@ -342,6 +342,14 @@ void
cogl_trace_describe (CoglTraceHead *head,
const char *description)
{
if (head->description)
{
char *old_description = head->description;
head->description =
g_strdup_printf ("%s, %s", old_description, description);
g_free (old_description);
}
else
head->description = g_strdup (description);
}