render: drop wlr_ prefix from wlr_renderer_bind_buffer

Make it clear this function is a private wlroots API and will stay
that way.
This commit is contained in:
Simon Ser 2021-06-08 09:16:18 +02:00
parent c87c849ec6
commit b2f6db3533
4 changed files with 10 additions and 11 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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;
}
}

View file

@ -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;