commit 34c1d5d

Michael Forney  ·  2014-10-19 20:51:47 +0000 UTC
parent ffbdce0
drm: Drop support for GEM names
1 files changed,  +3, -22
+3, -22
 1@@ -74,28 +74,9 @@ static void create_buffer(struct wl_client * client,
 2                           uint32_t name, int32_t width, int32_t height,
 3                           uint32_t stride, uint32_t format)
 4 {
 5-    struct wld_buffer * buffer;
 6-    struct wl_resource * buffer_resource;
 7-    union wld_object object = { .u32 = name };
 8-
 9-    buffer = wld_import_buffer(swc.drm->context, WLD_DRM_OBJECT_GEM_NAME,
10-                               object, width, height, format, stride);
11-
12-    if (!buffer)
13-        goto error0;
14-
15-    buffer_resource = swc_wayland_buffer_create_resource
16-        (client, wl_resource_get_version(resource), id, buffer);
17-
18-    if (!buffer_resource)
19-        goto error1;
20-
21-    return;
22-
23-  error1:
24-    wld_buffer_unreference(buffer);
25-  error0:
26-    wl_resource_post_no_memory(resource);
27+    wl_resource_post_error(resource, WL_DRM_ERROR_INVALID_NAME,
28+                           "GEM names are not supported, "
29+                           "use a PRIME fd instead");
30 }
31 
32 static void create_planar_buffer(struct wl_client * client,