glx: implement drawable refcounting.
authorStéphane Marchesin <marcheu@chromium.org>
Wed, 15 Jun 2011 22:09:12 +0000 (15:09 -0700)
committerStéphane Marchesin <marcheu@chromium.org>
Fri, 17 Jun 2011 18:20:19 +0000 (11:20 -0700)
commitbf69ce37f0dcbb479078ee676d5100ac63e20750
treecfb0bf5deb989d947503e2bbeddde5aa5080fb62
parent8173471fc25f4c768cab54fa840fd4c53d1c3c0f
glx: implement drawable refcounting.

The current dri context unbind logic will leak drawables until the process
dies (they will then get released by the GEM code). There are two ways to fix
this: either always call driReleaseDrawables every time we unbind a context
(but that costs us round trips to the X server at getbuffers() time) or
implement proper drawable refcounting. This patch implements the latter.

Signed-off-by: Antoine Labour <piman@chromium.org>
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
src/glx/dri2_glx.c
src/glx/dri_common.c
src/glx/dri_glx.c
src/glx/drisw_glx.c
src/glx/glxclient.h
src/glx/glxcurrent.c