aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-11-18 13:40:08 +0100
committerSimon Ser <contact@emersion.fr>2020-11-30 11:08:44 +0100
commitc15ca3793e35ae1cf755dd04d06f6c504b484350 (patch)
tree96cec7a931dce00b560001ddae38e2fb479f76c5
parent44cea53e7285fe25a81b3ce2dfb470daec27e6e4 (diff)
render: expand wlr_renderer_get{,_dmabuf}_formats docs
Make it clear formats returned are only suitable for import/sampling. These formats can't be used to be rendered to.
-rw-r--r--include/wlr/render/egl.h2
-rw-r--r--include/wlr/render/wlr_renderer.h6
2 files changed, 5 insertions, 3 deletions
diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h
index 46af0cf8..4ab672d3 100644
--- a/include/wlr/render/egl.h
+++ b/include/wlr/render/egl.h
@@ -123,7 +123,7 @@ EGLImageKHR wlr_egl_create_image_from_dmabuf(struct wlr_egl *egl,
struct wlr_dmabuf_attributes *attributes, bool *external_only);
/**
- * Get the available dmabuf formats
+ * Get DMA-BUF formats suitable for sampling usage.
*/
const struct wlr_drm_format_set *wlr_egl_get_dmabuf_formats(struct wlr_egl *egl);
diff --git a/include/wlr/render/wlr_renderer.h b/include/wlr/render/wlr_renderer.h
index 915ec915..1de69e16 100644
--- a/include/wlr/render/wlr_renderer.h
+++ b/include/wlr/render/wlr_renderer.h
@@ -83,7 +83,8 @@ void wlr_render_ellipse(struct wlr_renderer *r, const struct wlr_box *box,
void wlr_render_ellipse_with_matrix(struct wlr_renderer *r,
const float color[static 4], const float matrix[static 9]);
/**
- * Returns a list of pixel formats supported by this renderer.
+ * Get the shared-memory formats supporting import usage. Buffers allocated
+ * with a format from this list may be imported via wlr_texture_from_pixels.
*/
const enum wl_shm_format *wlr_renderer_get_formats(struct wlr_renderer *r,
size_t *len);
@@ -98,7 +99,8 @@ 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 DMA-BUF formats.
+ * Get the DMA-BUF formats supporting sampling usage. Buffers allocated with
+ * a format from this list may be imported via wlr_texture_from_dmabuf.
*/
const struct wlr_drm_format_set *wlr_renderer_get_dmabuf_formats(
struct wlr_renderer *renderer);