summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2013-03-29 11:09:48 -0700
committerMartin Robinson <mrobinson@igalia.com>2013-04-04 12:04:50 -0700
commitf6efecdfefa161c68fc5bf193a6487fc1a5047d5 (patch)
treef9b916f141d6968cc9d2d984a12cc2777fe10905
parentb00b9e82ab728eaf3b87dd1113387d8e8df0d7e3 (diff)
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
-rw-r--r--boilerplate/cairo-boilerplate-egl.c2
-rw-r--r--boilerplate/cairo-boilerplate-glx.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/boilerplate/cairo-boilerplate-egl.c b/boilerplate/cairo-boilerplate-egl.c
index e1a46e44..99bee64c 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 52cd99f9..06436446 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))