render: drop wlr_ prefix from wlr_renderer_bind_buffer

Make it clear this function is a private wlroots API and will stay
that way.
master
Simon Ser 4 years ago
parent c87c849ec6
commit b2f6db3533

@ -109,7 +109,7 @@ bool drm_surface_make_current(struct wlr_drm_surface *surf,
return false; 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"); wlr_log(WLR_ERROR, "Failed to bind buffer to renderer");
return false; 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) { void drm_surface_unset_current(struct wlr_drm_surface *surf) {
assert(surf->back_buffer != NULL); 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); wlr_buffer_unlock(surf->back_buffer);
surf->back_buffer = NULL; surf->back_buffer = NULL;

@ -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. * All subsequent rendering operations will operate on the supplied buffer.
* After rendering operations are done, the caller must unbind a buffer by * 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 * 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( const struct wlr_drm_format_set *wlr_renderer_get_render_formats(
struct wlr_renderer *renderer); struct wlr_renderer *renderer);

@ -49,8 +49,7 @@ void wlr_renderer_destroy(struct wlr_renderer *r) {
} }
} }
bool wlr_renderer_bind_buffer(struct wlr_renderer *r, bool renderer_bind_buffer(struct wlr_renderer *r, struct wlr_buffer *buffer) {
struct wlr_buffer *buffer) {
assert(!r->rendering); assert(!r->rendering);
if (!r->impl->bind_buffer) { if (!r->impl->bind_buffer) {
return false; 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, bool wlr_renderer_begin_with_buffer(struct wlr_renderer *r,
struct wlr_buffer *buffer) { struct wlr_buffer *buffer) {
if (!wlr_renderer_bind_buffer(r, buffer)) { if (!renderer_bind_buffer(r, buffer)) {
return false; return false;
} }
wlr_renderer_begin(r, buffer->width, buffer->height); wlr_renderer_begin(r, buffer->width, buffer->height);
@ -86,7 +85,7 @@ void wlr_renderer_end(struct wlr_renderer *r) {
r->rendering = false; r->rendering = false;
if (r->rendering_with_buffer) { if (r->rendering_with_buffer) {
wlr_renderer_bind_buffer(r, NULL); renderer_bind_buffer(r, NULL);
r->rendering_with_buffer = false; r->rendering_with_buffer = false;
} }
} }

@ -533,7 +533,7 @@ static bool output_attach_back_buffer(struct wlr_output *output,
return false; return false;
} }
if (!wlr_renderer_bind_buffer(renderer, buffer)) { if (!renderer_bind_buffer(renderer, buffer)) {
wlr_buffer_unlock(buffer); wlr_buffer_unlock(buffer);
return false; 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); struct wlr_renderer *renderer = wlr_backend_get_renderer(output->backend);
assert(renderer != NULL); assert(renderer != NULL);
wlr_renderer_bind_buffer(renderer, NULL); renderer_bind_buffer(renderer, NULL);
wlr_buffer_unlock(output->back_buffer); wlr_buffer_unlock(output->back_buffer);
output->back_buffer = NULL; output->back_buffer = NULL;

Loading…
Cancel
Save