aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/render.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr/render.h')
-rw-r--r--include/wlr/render.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/wlr/render.h b/include/wlr/render.h
index 61169333..47e2ff57 100644
--- a/include/wlr/render.h
+++ b/include/wlr/render.h
@@ -65,7 +65,7 @@ struct wlr_texture {
* Copies pixels to this texture. The buffer is not accessed after this function
* returns.
*/
-bool wlr_texture_upload_pixels(struct wlr_texture *surf,
+bool wlr_texture_upload_pixels(struct wlr_texture *tex,
enum wl_shm_format format, int stride, int width, int height,
const unsigned char *pixels);
/**
@@ -80,8 +80,17 @@ bool wlr_texture_update_pixels(struct wlr_texture *surf,
* Copies pixels from a wl_shm_buffer into this texture. The buffer is not
* accessed after this function returns.
*/
-bool wlr_texture_upload_shm(struct wlr_texture *surf, uint32_t format,
+bool wlr_texture_upload_shm(struct wlr_texture *tex, uint32_t format,
struct wl_shm_buffer *shm);
+
+/**
+ * Attaches the contents from the given wl_drm wl_buffer resource onto the
+ * texture. The wl_resource is not used after this call.
+ * Will fail (return false) if the given resource is no drm buffer.
+ */
+ bool wlr_texture_upload_drm(struct wlr_texture *tex,
+ struct wl_resource *drm_buffer);
+
/**
* Copies a rectangle of pixels from a wl_shm_buffer onto the texture. The
* buffer is not accessed after this function returns. Under some circumstances,