diff options
author | Simon Ser <contact@emersion.fr> | 2021-06-08 09:16:18 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-06-09 10:26:09 +0200 |
commit | b2f6db3533f2aff20986ee33ed6364d8bd4553bb (patch) | |
tree | 80c742f363ac49903b3de611a2f992a52106f674 | |
parent | c87c849ec6a166ea7472c5c87d02646dfc7151b4 (diff) |
render: drop wlr_ prefix from wlr_renderer_bind_buffer
Make it clear this function is a private wlroots API and will stay
that way.
-rw-r--r-- | backend/drm/renderer.c | 4 | ||||
-rw-r--r-- | include/render/wlr_renderer.h | 6 | ||||
-rw-r--r-- | render/wlr_renderer.c | 7 | ||||
-rw-r--r-- | types/wlr_output.c | 4 |
4 files changed, 10 insertions, 11 deletions
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c index e1e35e63..d6da8606 100644 --- a/backend/drm/renderer.c +++ b/backend/drm/renderer.c @@ -109,7 +109,7 @@ bool drm_surface_make_current(struct wlr_drm_surface *surf, return false; } - if (!wlr_renderer_bind_buffer(surf->renderer->wlr_rend, surf->back_buffer)) { + if (!renderer_bind_buffer(surf->renderer->wlr_rend, surf->back_buffer)) { wlr_log(WLR_ERROR, "Failed to bind buffer to renderer"); return false; } @@ -120,7 +120,7 @@ bool drm_surface_make_current(struct wlr_drm_surface *surf, void drm_surface_unset_current(struct wlr_drm_surface *surf) { assert(surf->back_buffer != NULL); - wlr_renderer_bind_buffer(surf->renderer->wlr_rend, NULL); + renderer_bind_buffer(surf->renderer->wlr_rend, NULL); wlr_buffer_unlock(surf->back_buffer); surf->back_buffer = NULL; diff --git a/include/render/wlr_renderer.h b/include/render/wlr_renderer.h index 9a16caed..c55b3ac8 100644 --- a/include/render/wlr_renderer.h +++ b/include/render/wlr_renderer.h @@ -12,12 +12,12 @@ struct wlr_renderer *renderer_autocreate_with_drm_fd(int drm_fd); * * All subsequent rendering operations will operate on the supplied buffer. * After rendering operations are done, the caller must unbind a buffer by - * calling wlr_renderer_bind_buffer with a NULL buffer. + * calling renderer_bind_buffer with a NULL buffer. */ -bool wlr_renderer_bind_buffer(struct wlr_renderer *r, struct wlr_buffer *buffer); +bool renderer_bind_buffer(struct wlr_renderer *r, struct wlr_buffer *buffer); /** * Get the supported render formats. Buffers allocated with a format from this - * list may be attached via wlr_renderer_bind_buffer. + * list may be attached via wlr_renderer_begin_with_buffer. */ const struct wlr_drm_format_set *wlr_renderer_get_render_formats( struct wlr_renderer *renderer); diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c index 4ff43139..0f8976dd 100644 --- a/render/wlr_renderer.c +++ b/render/wlr_renderer.c @@ -49,8 +49,7 @@ void wlr_renderer_destroy(struct wlr_renderer *r) { } } -bool wlr_renderer_bind_buffer(struct wlr_renderer *r, - struct wlr_buffer *buffer) { +bool renderer_bind_buffer(struct wlr_renderer *r, struct wlr_buffer *buffer) { assert(!r->rendering); if (!r->impl->bind_buffer) { return false; @@ -68,7 +67,7 @@ void wlr_renderer_begin(struct wlr_renderer *r, uint32_t width, uint32_t height) bool wlr_renderer_begin_with_buffer(struct wlr_renderer *r, struct wlr_buffer *buffer) { - if (!wlr_renderer_bind_buffer(r, buffer)) { + if (!renderer_bind_buffer(r, buffer)) { return false; } wlr_renderer_begin(r, buffer->width, buffer->height); @@ -86,7 +85,7 @@ void wlr_renderer_end(struct wlr_renderer *r) { r->rendering = false; if (r->rendering_with_buffer) { - wlr_renderer_bind_buffer(r, NULL); + renderer_bind_buffer(r, NULL); r->rendering_with_buffer = false; } } diff --git a/types/wlr_output.c b/types/wlr_output.c index 78ad9a6e..09ba4e68 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -533,7 +533,7 @@ static bool output_attach_back_buffer(struct wlr_output *output, return false; } - if (!wlr_renderer_bind_buffer(renderer, buffer)) { + if (!renderer_bind_buffer(renderer, buffer)) { wlr_buffer_unlock(buffer); return false; } @@ -550,7 +550,7 @@ static void output_clear_back_buffer(struct wlr_output *output) { struct wlr_renderer *renderer = wlr_backend_get_renderer(output->backend); assert(renderer != NULL); - wlr_renderer_bind_buffer(renderer, NULL); + renderer_bind_buffer(renderer, NULL); wlr_buffer_unlock(output->back_buffer); output->back_buffer = NULL; |