[cairo] [PATCH] gl: don't access ctx after release

Chris Wilson chris at chris-wilson.co.uk
Wed May 30 03:13:19 PDT 2012


On Tue, 29 May 2012 14:33:40 +0800, Yuanhan Liu <yuanhan.liu at linux.intel.com> wrote:
> _cairo_gl_surface_map_to_image still access ctx->has_mesa_pack_invert after
> release, which does't make sense.

Conceptually you are right, and enforcing this does reduce the
assumptions made by the code and keeps it clean. I didn't quite like how
the function repeated the same checks, so I replaced those with locals
to improve readibility further.

Thanks,
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the cairo mailing list