gallium-egl: Simplify native_wayland_drm_bufmgr_helper interface
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Thu, 18 Jul 2013 12:11:23 +0000 (15:11 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 7 Aug 2013 17:37:58 +0000 (10:37 -0700)
commit331a8fa41d174c74afe58f43a5943627398eac6b
tree972c6bdd468c9f317ea19d0ac92bfaaf5da729ba
parent79b868fea137bea095b64bd14cb174ca8af98705
gallium-egl: Simplify native_wayland_drm_bufmgr_helper interface

The helper provides a series of functions to easy the implementation
of the WL_bind_wayland_display extension on different platforms. But
even with the helpers there was still a bit of duplicated code between
platforms, with the drm authentication being the only part that
differs.

This patch changes the bufmgr interface to provide a self contained
object with a create function that takes a drm authentication callback
as an argument. That way all the helper functions are made static and
the "_helper" suffix was removed from the sources file name.

This change also removes the mix of Wayland client and server code in
the wayland drm platform source file. All the uses of libwayland-server
are now contained in native_wayland_drm_bufmgr.c.

Changes to the drm platform are only compile tested.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
src/gallium/state_trackers/egl/Makefile.am
src/gallium/state_trackers/egl/common/native.h
src/gallium/state_trackers/egl/common/native_wayland_drm_bufmgr.c [new file with mode: 0644]
src/gallium/state_trackers/egl/common/native_wayland_drm_bufmgr.h [new file with mode: 0644]
src/gallium/state_trackers/egl/common/native_wayland_drm_bufmgr_helper.c [deleted file]
src/gallium/state_trackers/egl/common/native_wayland_drm_bufmgr_helper.h [deleted file]
src/gallium/state_trackers/egl/drm/native_drm.c
src/gallium/state_trackers/egl/drm/native_drm.h
src/gallium/state_trackers/egl/wayland/native_drm.c
src/gallium/state_trackers/egl/x11/native_dri2.c