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:
parent
521668202d
commit
bed42454d3
1 changed files with 9 additions and 1 deletions
|
@ -342,7 +342,15 @@ void
|
||||||
cogl_trace_describe (CoglTraceHead *head,
|
cogl_trace_describe (CoglTraceHead *head,
|
||||||
const char *description)
|
const char *description)
|
||||||
{
|
{
|
||||||
head->description = g_strdup (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);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue