render: rename get_dmabuf_render_formats into get_render_formats

master
Simon Zeni 4 years ago committed by Simon Ser
parent 004cf887b7
commit 84dea55b20

@ -225,7 +225,7 @@ bool drm_plane_init_surface(struct wlr_drm_plane *plane,
} }
const struct wlr_drm_format_set *render_formats = 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) { if (render_formats == NULL) {
wlr_log(WLR_ERROR, "Failed to get render formats"); wlr_log(WLR_ERROR, "Failed to get render formats");
return false; return false;

@ -131,7 +131,7 @@ static bool backend_init(struct wlr_headless_backend *backend,
backend->renderer = renderer; backend->renderer = renderer;
const struct wlr_drm_format_set *formats = 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) { if (formats == NULL) {
wlr_log(WLR_ERROR, "Failed to get available DMA-BUF formats from renderer"); wlr_log(WLR_ERROR, "Failed to get available DMA-BUF formats from renderer");
return false; 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 = 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) { if (render_formats == NULL) {
wlr_log(WLR_ERROR, "Failed to get available DMA-BUF formats from renderer"); wlr_log(WLR_ERROR, "Failed to get available DMA-BUF formats from renderer");
goto error_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 = 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) { if (render_formats == NULL) {
wlr_log(WLR_ERROR, "Failed to get available DMA-BUF formats from renderer"); wlr_log(WLR_ERROR, "Failed to get available DMA-BUF formats from renderer");
return false; 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); bool wlr_renderer_bind_buffer(struct wlr_renderer *r, struct wlr_buffer *buffer);
/** /**
* Get the DMA-BUF formats supporting rendering usage. Buffers allocated with * Get the supported render formats. Buffers allocated with a format from this
* a format from this list may be attached via wlr_renderer_bind_buffer. * 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); struct wlr_renderer *renderer);
#endif #endif

@ -38,7 +38,7 @@ struct wlr_renderer_impl {
struct wl_resource *buffer, int *width, int *height); struct wl_resource *buffer, int *width, int *height);
const struct wlr_drm_format_set *(*get_dmabuf_texture_formats)( const struct wlr_drm_format_set *(*get_dmabuf_texture_formats)(
struct wlr_renderer *renderer); 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); struct wlr_renderer *renderer);
uint32_t (*preferred_read_format)(struct wlr_renderer *renderer); uint32_t (*preferred_read_format)(struct wlr_renderer *renderer);
bool (*read_pixels)(struct wlr_renderer *renderer, uint32_t fmt, 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); 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_renderer *wlr_renderer) {
struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer); struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer);
return wlr_egl_get_dmabuf_render_formats(renderer->egl); 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, .resource_is_wl_drm_buffer = gles2_resource_is_wl_drm_buffer,
.wl_drm_buffer_get_size = gles2_wl_drm_buffer_get_size, .wl_drm_buffer_get_size = gles2_wl_drm_buffer_get_size,
.get_dmabuf_texture_formats = gles2_get_dmabuf_texture_formats, .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, .preferred_read_format = gles2_preferred_read_format,
.read_pixels = gles2_read_pixels, .read_pixels = gles2_read_pixels,
.texture_from_pixels = gles2_texture_from_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); 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) { struct wlr_renderer *r) {
if (!r->impl->get_dmabuf_render_formats) { if (!r->impl->get_render_formats) {
return NULL; 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, bool wlr_renderer_read_pixels(struct wlr_renderer *r, uint32_t fmt,

Loading…
Cancel
Save