[cairo] [PATCH 2/2] gl: Remove the unbinding of the GL context after cairo is done.

Eric Anholt eric at anholt.net
Mon Jan 31 23:57:03 PST 2011


The unbind was introduced to try to support cairo-gl in gstreamer
without gstreamer having to be aware of GL's requirements.  However,
the performance hit is just too large, so this removes the expensive
context unbind (really, the expensive flush that happens on unbind) to
match the interoperability comment in cairo-gl.h.

[  0] before      firefox-talos-gfx   50.260   50.525   0.25%    3/3
[  0] after       firefox-talos-gfx   32.091   32.422   0.65%    3/3
---
 src/cairo-glx-context.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/src/cairo-glx-context.c b/src/cairo-glx-context.c
index 83963fb..5af4b82 100644
--- a/src/cairo-glx-context.c
+++ b/src/cairo-glx-context.c
@@ -90,9 +90,6 @@ _glx_make_current (void *abstract_ctx, cairo_gl_surface_t *abstract_surface)
 static void
 _glx_release (void *abstract_ctx)
 {
-    cairo_glx_context_t *ctx = abstract_ctx;
-
-    glXMakeCurrent (ctx->display, None, None);
 }
 
 static void
-- 
1.7.2.3



More information about the cairo mailing list