[cairo-commit] perf/cairo-perf.h perf/cairo-perf-trace.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Oct 20 06:27:52 PDT 2010


 perf/cairo-perf-trace.c |    5 +++++
 perf/cairo-perf.h       |    1 +
 2 files changed, 6 insertions(+)

New commits:
commit c6c3bdba4b43a1f678dae46bfe52d37fc292c6d4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Oct 20 14:26:37 2010 +0100

    perf: Only print description once per backend
    
    Currently we print the backend description before every time, which is
    overly verbose. As the information doesn't^Wshouldn't change, simply
    print it before running the first test of each target.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c
index d347908..78c5402 100644
--- a/perf/cairo-perf-trace.c
+++ b/perf/cairo-perf-trace.c
@@ -278,6 +278,10 @@ describe (cairo_perf_t *perf,
 {
     char *description = NULL;
 
+    if (perf->has_described_backend)
+	    return;
+    perf->has_described_backend = TRUE;
+
     if (perf->target->describe)
         description = perf->target->describe (closure);
 
@@ -827,6 +831,7 @@ main (int   argc,
 
 	perf.target = target;
 	perf.test_number = 0;
+	perf.has_described_backend = FALSE;
 
 	if (perf.exact_names) {
 	    for (n = 0; n < perf.num_names; n++) {
diff --git a/perf/cairo-perf.h b/perf/cairo-perf.h
index ff177c4..0b90dda 100644
--- a/perf/cairo-perf.h
+++ b/perf/cairo-perf.h
@@ -91,6 +91,7 @@ typedef struct _cairo_perf {
     const cairo_boilerplate_target_t **targets;
     int num_targets;
     const cairo_boilerplate_target_t *target;
+    cairo_bool_t has_described_backend;
     unsigned int test_number;
     unsigned int size;
     cairo_t *cr;


More information about the cairo-commit mailing list