swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 34c1d5d189b5e79378d5a8253374bafeab99c33f
parent ffbdce05af9a173d586fff6e34f212c0ca1c6d1a
Author: Michael Forney <mforney@mforney.org>
Date:   Sun, 19 Oct 2014 13:51:47 -0700

drm: Drop support for GEM names

Diffstat:
Mlibswc/drm.c | 25+++----------------------
1 file changed, 3 insertions(+), 22 deletions(-)

diff --git a/libswc/drm.c b/libswc/drm.c @@ -74,28 +74,9 @@ static void create_buffer(struct wl_client * client, uint32_t name, int32_t width, int32_t height, uint32_t stride, uint32_t format) { - struct wld_buffer * buffer; - struct wl_resource * buffer_resource; - union wld_object object = { .u32 = name }; - - buffer = wld_import_buffer(swc.drm->context, WLD_DRM_OBJECT_GEM_NAME, - object, width, height, format, stride); - - if (!buffer) - goto error0; - - buffer_resource = swc_wayland_buffer_create_resource - (client, wl_resource_get_version(resource), id, buffer); - - if (!buffer_resource) - goto error1; - - return; - - error1: - wld_buffer_unreference(buffer); - error0: - wl_resource_post_no_memory(resource); + wl_resource_post_error(resource, WL_DRM_ERROR_INVALID_NAME, + "GEM names are not supported, " + "use a PRIME fd instead"); } static void create_planar_buffer(struct wl_client * client,