mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-25 00:22:25 +00:00
render: drop wlr_renderer_get_dmabuf_texture_formats()
wlr_renderer_get_texture_formats() with WLR_BUFFER_CAP_DMABUF is the replacement.
This commit is contained in:
parent
85c1eda721
commit
0686666cf5
@ -234,7 +234,7 @@ struct wlr_backend *wlr_drm_backend_create(struct wlr_session *session,
|
||||
// to be able to texture from them
|
||||
struct wlr_renderer *renderer = drm->mgpu_renderer.wlr_rend;
|
||||
const struct wlr_drm_format_set *texture_formats =
|
||||
wlr_renderer_get_dmabuf_texture_formats(renderer);
|
||||
wlr_renderer_get_texture_formats(renderer, WLR_BUFFER_CAP_DMABUF);
|
||||
if (texture_formats == NULL) {
|
||||
wlr_log(WLR_ERROR, "Failed to query renderer texture formats");
|
||||
goto error_mgpu_renderer;
|
||||
|
@ -296,7 +296,7 @@ int main(int argc, char *argv[]) {
|
||||
server.renderer = wlr_renderer_autocreate(server.backend);
|
||||
wlr_renderer_init_wl_shm(server.renderer, server.wl_display);
|
||||
|
||||
if (wlr_renderer_get_dmabuf_texture_formats(server.renderer) != NULL) {
|
||||
if (wlr_renderer_get_texture_formats(server.renderer, WLR_BUFFER_CAP_DMABUF) != NULL) {
|
||||
wlr_drm_create(server.wl_display, server.renderer);
|
||||
server.linux_dmabuf_v1 = wlr_linux_dmabuf_v1_create_with_renderer(
|
||||
server.wl_display, 4, server.renderer);
|
||||
|
@ -59,12 +59,6 @@ struct wlr_renderer *wlr_renderer_autocreate(struct wlr_backend *backend);
|
||||
*/
|
||||
const struct wlr_drm_format_set *wlr_renderer_get_texture_formats(
|
||||
struct wlr_renderer *r, uint32_t buffer_caps);
|
||||
/**
|
||||
* 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_texture_formats(
|
||||
struct wlr_renderer *renderer);
|
||||
|
||||
/**
|
||||
* Initializes wl_shm, linux-dmabuf and other buffer factory protocols.
|
||||
|
@ -62,11 +62,6 @@ const struct wlr_drm_format_set *wlr_renderer_get_texture_formats(
|
||||
return r->impl->get_texture_formats(r, buffer_caps);
|
||||
}
|
||||
|
||||
const struct wlr_drm_format_set *wlr_renderer_get_dmabuf_texture_formats(
|
||||
struct wlr_renderer *r) {
|
||||
return wlr_renderer_get_texture_formats(r, WLR_BUFFER_CAP_DMABUF);
|
||||
}
|
||||
|
||||
const struct wlr_drm_format_set *wlr_renderer_get_render_formats(
|
||||
struct wlr_renderer *r) {
|
||||
if (!r->impl->get_render_formats) {
|
||||
@ -90,7 +85,7 @@ bool wlr_renderer_init_wl_display(struct wlr_renderer *r,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (wlr_renderer_get_dmabuf_texture_formats(r) != NULL &&
|
||||
if (wlr_renderer_get_texture_formats(r, WLR_BUFFER_CAP_DMABUF) != NULL &&
|
||||
wlr_renderer_get_drm_fd(r) >= 0 &&
|
||||
wlr_linux_dmabuf_v1_create_with_renderer(wl_display, 4, r) == NULL) {
|
||||
return false;
|
||||
|
@ -236,7 +236,8 @@ struct wlr_drm *wlr_drm_create(struct wl_display *display,
|
||||
drm->node_name = node_name;
|
||||
wl_signal_init(&drm->events.destroy);
|
||||
|
||||
const struct wlr_drm_format_set *formats = wlr_renderer_get_dmabuf_texture_formats(renderer);
|
||||
const struct wlr_drm_format_set *formats =
|
||||
wlr_renderer_get_texture_formats(renderer, WLR_BUFFER_CAP_DMABUF);
|
||||
if (formats == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
@ -1100,7 +1100,7 @@ bool wlr_linux_dmabuf_feedback_v1_init_with_options(struct wlr_linux_dmabuf_feed
|
||||
feedback->main_device = renderer_dev;
|
||||
|
||||
const struct wlr_drm_format_set *renderer_formats =
|
||||
wlr_renderer_get_dmabuf_texture_formats(options->main_renderer);
|
||||
wlr_renderer_get_texture_formats(options->main_renderer, WLR_BUFFER_CAP_DMABUF);
|
||||
if (renderer_formats == NULL) {
|
||||
wlr_log(WLR_ERROR, "Failed to get renderer DMA-BUF texture formats");
|
||||
goto error;
|
||||
|
Loading…
Reference in New Issue
Block a user