[cairo-commit] 2 commits - boilerplate/cairo-boilerplate-egl.c boilerplate/cairo-boilerplate-glx.c boilerplate/cairo-boilerplate.h
Martin Robinson
mrobinson at kemper.freedesktop.org
Thu Apr 4 12:12:29 PDT 2013
boilerplate/cairo-boilerplate-egl.c | 2 ++
boilerplate/cairo-boilerplate-glx.c | 3 +++
boilerplate/cairo-boilerplate.h | 7 ++++++-
3 files changed, 11 insertions(+), 1 deletion(-)
New commits:
commit f6efecdfefa161c68fc5bf193a6487fc1a5047d5
Author: Martin Robinson <mrobinson at igalia.com>
Date: Fri Mar 29 11:09:48 2013 -0700
boilerplate/gl: Disable thread awareness
This dramatically speeds up testing on NVidia and actually makes it
possible to run traces within a reasonable amount of time.
cairo-perf-trace results for:
NVIDIA Corporation GeForce GTS 250/PCIe/SSE2 3.3.0 NVIDIA 310.14
Before:
test min(s) median(s) stddev. count
gvim 30.924 31.251 0.72% 5/6
firefox-fishbowl 168.751 201.017 12.46% 8/8
(exited early)
After:
test min(s) median(s) stddev. count
gvim 1.294 1.325 1.79% 6/6
firefox-fishbowl 18.540 19.104 1.54% 6/6
diff --git a/boilerplate/cairo-boilerplate-egl.c b/boilerplate/cairo-boilerplate-egl.c
index e1a46e4..99bee64 100644
--- a/boilerplate/cairo-boilerplate-egl.c
+++ b/boilerplate/cairo-boilerplate-egl.c
@@ -130,6 +130,8 @@ _cairo_boilerplate_egl_create_surface (const char *name,
}
gltc->device = cairo_egl_device_create (gltc->dpy, gltc->ctx);
+ if (mode == CAIRO_BOILERPLATE_MODE_PERF)
+ cairo_gl_device_set_thread_aware(gltc->device, FALSE);
if (width < 1)
width = 1;
diff --git a/boilerplate/cairo-boilerplate-glx.c b/boilerplate/cairo-boilerplate-glx.c
index 52cd99f..0643644 100644
--- a/boilerplate/cairo-boilerplate-glx.c
+++ b/boilerplate/cairo-boilerplate-glx.c
@@ -135,6 +135,9 @@ _cairo_boilerplate_gl_create_surface (const char *name,
gltc->ctx = ctx;
gltc->device = cairo_glx_device_create (dpy, ctx);
+ if (mode == CAIRO_BOILERPLATE_MODE_PERF)
+ cairo_gl_device_set_thread_aware(gltc->device, FALSE);
+
gltc->surface = surface = cairo_gl_surface_create (gltc->device,
content, width, height);
if (cairo_surface_status (surface))
commit b00b9e82ab728eaf3b87dd1113387d8e8df0d7e3
Author: Martin Robinson <mrobinson at igalia.com>
Date: Thu Apr 4 12:03:19 2013 -0700
boilerplate: Add a mode for running threaded perf tests
This is useful because the GL backend runs much faster on some drivers
when thread awareness is disabled.
diff --git a/boilerplate/cairo-boilerplate.h b/boilerplate/cairo-boilerplate.h
index 461b98b..4f6b8fd 100644
--- a/boilerplate/cairo-boilerplate.h
+++ b/boilerplate/cairo-boilerplate.h
@@ -113,7 +113,12 @@ cairo_boilerplate_format_from_content (cairo_content_t content);
typedef enum {
CAIRO_BOILERPLATE_MODE_TEST,
- CAIRO_BOILERPLATE_MODE_PERF
+ CAIRO_BOILERPLATE_MODE_PERF,
+
+ /* This will allow running performance test with threads. The
+ * GL backend is very slow on some drivers when run with thread
+ * awareness turned on. */
+ CAIRO_BOILERPLATE_MODE_PERF_THREADS,
} cairo_boilerplate_mode_t;
typedef cairo_surface_t *
More information about the cairo-commit
mailing list