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

Andrea Canciani ranma42 at gmail.com
Tue Feb 1 01:12:30 PST 2011


On Tue, Feb 1, 2011 at 8:57 AM, Eric Anholt <eric at anholt.net> wrote:
> 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
>

Would it be correct to apply the same change to wgl, too?
I'd like cairo-gl context behavior to be the same both on wgl and glx
(as much as possible).

Andrea


More information about the cairo mailing list