mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-29 20:50:14 +01:00
perf: print comment describing backend
Use the descibe string to output information about the backend we're testing.
This commit is contained in:
parent
fcfe7c6724
commit
9ce87c67ff
1 changed files with 30 additions and 1 deletions
|
|
@ -272,8 +272,35 @@ interrupt (int sig)
|
|||
user_interrupt = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
describe (cairo_perf_t *perf,
|
||||
void *closure)
|
||||
{
|
||||
char *description = NULL;
|
||||
|
||||
if (perf->target->describe)
|
||||
description = perf->target->describe (closure);
|
||||
|
||||
if (description == NULL)
|
||||
return;
|
||||
|
||||
if (perf->raw) {
|
||||
printf ("[ # ] %s: %s\n", perf->target->name, description);
|
||||
}
|
||||
|
||||
if (perf->summary) {
|
||||
fprintf (perf->summary,
|
||||
"[ # ] %8s: %s\n",
|
||||
perf->target->name,
|
||||
description);
|
||||
}
|
||||
|
||||
free (description);
|
||||
}
|
||||
|
||||
static void
|
||||
execute (cairo_perf_t *perf,
|
||||
void *closure,
|
||||
cairo_surface_t *target,
|
||||
const char *trace)
|
||||
{
|
||||
|
|
@ -316,6 +343,8 @@ execute (cairo_perf_t *perf,
|
|||
first_run = FALSE;
|
||||
}
|
||||
|
||||
describe (perf, closure);
|
||||
|
||||
times = perf->times;
|
||||
|
||||
if (perf->summary) {
|
||||
|
|
@ -686,7 +715,7 @@ cairo_perf_trace (cairo_perf_t *perf,
|
|||
|
||||
cairo_perf_timer_set_synchronize (target->synchronize, closure);
|
||||
|
||||
execute (perf, surface, trace);
|
||||
execute (perf, closure, surface, trace);
|
||||
|
||||
cairo_surface_destroy (surface);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue