mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 14:15:58 +01:00
render: rename get_dmabuf_render_formats into get_render_formats
This commit is contained in:
parent
004cf887b7
commit
84dea55b20
8 changed files with 13 additions and 13 deletions
|
@ -225,7 +225,7 @@ bool drm_plane_init_surface(struct wlr_drm_plane *plane,
|
|||
}
|
||||
|
||||
const struct wlr_drm_format_set *render_formats =
|
||||
wlr_renderer_get_dmabuf_render_formats(drm->renderer.wlr_rend);
|
||||
wlr_renderer_get_render_formats(drm->renderer.wlr_rend);
|
||||
if (render_formats == NULL) {
|
||||
wlr_log(WLR_ERROR, "Failed to get render formats");
|
||||
return false;
|
||||
|
|
|
@ -131,7 +131,7 @@ static bool backend_init(struct wlr_headless_backend *backend,
|
|||
backend->renderer = renderer;
|
||||
|
||||
const struct wlr_drm_format_set *formats =
|
||||
wlr_renderer_get_dmabuf_render_formats(backend->renderer);
|
||||
wlr_renderer_get_render_formats(backend->renderer);
|
||||
if (formats == NULL) {
|
||||
wlr_log(WLR_ERROR, "Failed to get available DMA-BUF formats from renderer");
|
||||
return false;
|
||||
|
|
|
@ -459,7 +459,7 @@ struct wlr_backend *wlr_wl_backend_create(struct wl_display *display,
|
|||
}
|
||||
|
||||
const struct wlr_drm_format_set *render_formats =
|
||||
wlr_renderer_get_dmabuf_render_formats(wl->renderer);
|
||||
wlr_renderer_get_render_formats(wl->renderer);
|
||||
if (render_formats == NULL) {
|
||||
wlr_log(WLR_ERROR, "Failed to get available DMA-BUF formats from renderer");
|
||||
goto error_renderer;
|
||||
|
|
|
@ -593,7 +593,7 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display,
|
|||
}
|
||||
|
||||
const struct wlr_drm_format_set *render_formats =
|
||||
wlr_renderer_get_dmabuf_render_formats(x11->renderer);
|
||||
wlr_renderer_get_render_formats(x11->renderer);
|
||||
if (render_formats == NULL) {
|
||||
wlr_log(WLR_ERROR, "Failed to get available DMA-BUF formats from renderer");
|
||||
return false;
|
||||
|
|
|
@ -16,10 +16,10 @@ struct wlr_renderer *wlr_renderer_autocreate_with_drm_fd(int drm_fd);
|
|||
*/
|
||||
bool wlr_renderer_bind_buffer(struct wlr_renderer *r, struct wlr_buffer *buffer);
|
||||
/**
|
||||
* Get the DMA-BUF formats supporting rendering usage. Buffers allocated with
|
||||
* a format from this list may be attached via wlr_renderer_bind_buffer.
|
||||
* Get the supported render formats. Buffers allocated with a format from this
|
||||
* list may be attached via wlr_renderer_bind_buffer.
|
||||
*/
|
||||
const struct wlr_drm_format_set *wlr_renderer_get_dmabuf_render_formats(
|
||||
const struct wlr_drm_format_set *wlr_renderer_get_render_formats(
|
||||
struct wlr_renderer *renderer);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -38,7 +38,7 @@ struct wlr_renderer_impl {
|
|||
struct wl_resource *buffer, int *width, int *height);
|
||||
const struct wlr_drm_format_set *(*get_dmabuf_texture_formats)(
|
||||
struct wlr_renderer *renderer);
|
||||
const struct wlr_drm_format_set *(*get_dmabuf_render_formats)(
|
||||
const struct wlr_drm_format_set *(*get_render_formats)(
|
||||
struct wlr_renderer *renderer);
|
||||
uint32_t (*preferred_read_format)(struct wlr_renderer *renderer);
|
||||
bool (*read_pixels)(struct wlr_renderer *renderer, uint32_t fmt,
|
||||
|
|
|
@ -395,7 +395,7 @@ static const struct wlr_drm_format_set *gles2_get_dmabuf_texture_formats(
|
|||
return wlr_egl_get_dmabuf_texture_formats(renderer->egl);
|
||||
}
|
||||
|
||||
static const struct wlr_drm_format_set *gles2_get_dmabuf_render_formats(
|
||||
static const struct wlr_drm_format_set *gles2_get_render_formats(
|
||||
struct wlr_renderer *wlr_renderer) {
|
||||
struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer);
|
||||
return wlr_egl_get_dmabuf_render_formats(renderer->egl);
|
||||
|
@ -576,7 +576,7 @@ static const struct wlr_renderer_impl renderer_impl = {
|
|||
.resource_is_wl_drm_buffer = gles2_resource_is_wl_drm_buffer,
|
||||
.wl_drm_buffer_get_size = gles2_wl_drm_buffer_get_size,
|
||||
.get_dmabuf_texture_formats = gles2_get_dmabuf_texture_formats,
|
||||
.get_dmabuf_render_formats = gles2_get_dmabuf_render_formats,
|
||||
.get_render_formats = gles2_get_render_formats,
|
||||
.preferred_read_format = gles2_preferred_read_format,
|
||||
.read_pixels = gles2_read_pixels,
|
||||
.texture_from_pixels = gles2_texture_from_pixels,
|
||||
|
|
|
@ -160,12 +160,12 @@ const struct wlr_drm_format_set *wlr_renderer_get_dmabuf_texture_formats(
|
|||
return r->impl->get_dmabuf_texture_formats(r);
|
||||
}
|
||||
|
||||
const struct wlr_drm_format_set *wlr_renderer_get_dmabuf_render_formats(
|
||||
const struct wlr_drm_format_set *wlr_renderer_get_render_formats(
|
||||
struct wlr_renderer *r) {
|
||||
if (!r->impl->get_dmabuf_render_formats) {
|
||||
if (!r->impl->get_render_formats) {
|
||||
return NULL;
|
||||
}
|
||||
return r->impl->get_dmabuf_render_formats(r);
|
||||
return r->impl->get_render_formats(r);
|
||||
}
|
||||
|
||||
bool wlr_renderer_read_pixels(struct wlr_renderer *r, uint32_t fmt,
|
||||
|
|
Loading…
Reference in a new issue