aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/render
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr/render')
-rw-r--r--include/wlr/render/egl.h2
-rw-r--r--include/wlr/render/interface.h5
-rw-r--r--include/wlr/render/wlr_renderer.h16
3 files changed, 22 insertions, 1 deletions
diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h
index 51f63b20..0b7f1dde 100644
--- a/include/wlr/render/egl.h
+++ b/include/wlr/render/egl.h
@@ -83,7 +83,7 @@ int wlr_egl_get_dmabuf_formats(struct wlr_egl *egl, int **formats);
* Get the available dmabuf modifiers for a given format
*/
int wlr_egl_get_dmabuf_modifiers(struct wlr_egl *egl, int format,
- uint64_t **modifiers);
+ uint64_t **modifiers);
/**
* Destroys an EGL image created with the given wlr_egl.
diff --git a/include/wlr/render/interface.h b/include/wlr/render/interface.h
index 597e4b39..9dbe7247 100644
--- a/include/wlr/render/interface.h
+++ b/include/wlr/render/interface.h
@@ -36,6 +36,11 @@ struct wlr_renderer_impl {
struct wl_resource *resource);
void (*wl_drm_buffer_get_size)(struct wlr_renderer *renderer,
struct wl_resource *buffer, int *width, int *height);
+ bool (*check_import_dmabuf)(struct wlr_renderer *renderer,
+ struct wlr_dmabuf_buffer *dmabuf);
+ int (*get_dmabuf_formats)(struct wlr_renderer *renderer, int **formats);
+ int (*get_dmabuf_modifiers)(struct wlr_renderer *renderer, int format,
+ uint64_t **modifiers);
bool (*read_pixels)(struct wlr_renderer *renderer, enum wl_shm_format fmt,
uint32_t stride, uint32_t width, uint32_t height,
uint32_t src_x, uint32_t src_y, uint32_t dst_x, uint32_t dst_y,
diff --git a/include/wlr/render/wlr_renderer.h b/include/wlr/render/wlr_renderer.h
index 65fc7b19..9ead7d81 100644
--- a/include/wlr/render/wlr_renderer.h
+++ b/include/wlr/render/wlr_renderer.h
@@ -65,6 +65,22 @@ bool wlr_renderer_resource_is_wl_drm_buffer(struct wlr_renderer *renderer,
void wlr_renderer_wl_drm_buffer_get_size(struct wlr_renderer *renderer,
struct wl_resource *buffer, int *width, int *height);
/**
+ * Get the available dmabuf formats
+ */
+int wlr_renderer_get_dmabuf_formats(struct wlr_renderer *renderer,
+ int **formats);
+/**
+ * Get the available dmabuf modifiers for a given format
+ */
+int wlr_renderer_get_dmabuf_modifiers(struct wlr_renderer *renderer, int format,
+ uint64_t **modifiers);
+/**
+ * Try to import the given dmabuf. On success return true false otherwise.
+ * If this succeeds the dmabuf can be used for rendering on a texture
+ */
+bool wlr_renderer_check_import_dmabuf(struct wlr_renderer *renderer,
+ struct wlr_dmabuf_buffer *dmabuf);
+/**
* Reads out of pixels of the currently bound surface into data. `stride` is in
* bytes.
*/