render: remove wlr_renderer_check_import_dmabuf

It's possible to implement it outside the renderer, by creating a
texture and destroying it right away. This reduces the API surface
of the renderer.
This commit is contained in:
emersion 2018-05-30 14:18:07 +01:00
parent 41e53d1499
commit 135721118a
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
8 changed files with 32 additions and 63 deletions

View file

@ -67,13 +67,6 @@ EGLImageKHR wlr_egl_create_image_from_wl_drm(struct wlr_egl *egl,
EGLImageKHR wlr_egl_create_image_from_dmabuf(struct wlr_egl *egl,
struct wlr_dmabuf_attributes *attributes);
/**
* 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_egl_check_import_dmabuf(struct wlr_egl *egl,
struct wlr_dmabuf_attributes *attributes);
/**
* Get the available dmabuf formats
*/

View file

@ -30,8 +30,6 @@ 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_attributes *attribs);
int (*get_dmabuf_formats)(struct wlr_renderer *renderer, int **formats);
int (*get_dmabuf_modifiers)(struct wlr_renderer *renderer, int format,
uint64_t **modifiers);

View file

@ -84,12 +84,6 @@ int wlr_renderer_get_dmabuf_formats(struct wlr_renderer *renderer,
*/
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_attributes *attributes);
/**
* Reads out of pixels of the currently bound surface into data. `stride` is in
* bytes.