commit eefa125

Michael Forney  ·  2013-07-19 08:00:43 +0000 UTC
parent a291d87
drm: Add PRIME fd accessor
2 files changed,  +12, -0
+5, -0
 1@@ -261,6 +261,11 @@ struct wld_drawable * wld_drm_create_drawable(struct wld_drm_context * drm,
 2     return &drawable->base;
 3 }
 4 
 5+int wld_drm_get_prime_fd(struct wld_drawable * drawable)
 6+{
 7+    return ((struct drm_drawable *)(void *) drawable)->fd;
 8+}
 9+
10 void registry_global(void * data, struct wl_registry * registry, uint32_t name,
11                      const char * interface, uint32_t version)
12 {
+7, -0
 1@@ -68,5 +68,12 @@ struct wld_drawable * wld_drm_create_drawable(struct wld_drm_context * context,
 2                                               enum wld_format format,
 3                                               struct wl_buffer ** buffer);
 4 
 5+/**
 6+ * Get a PRIME file descriptor for this DRM drawable.
 7+ *
 8+ * @note The drawable must have been created with wld_drm_create_drawable
 9+ */
10+int wld_drm_get_prime_fd(struct wld_drawable * drawable);
11+
12 #endif
13