mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-26 06:59:52 -05:00
output: change set_dmabuf to attach_buffer
This commit is contained in:
parent
493804e421
commit
1d222309b8
4 changed files with 27 additions and 21 deletions
|
|
@ -478,8 +478,8 @@ bool wlr_output_commit(struct wlr_output *output) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool wlr_output_set_dmabuf(struct wlr_output *output,
|
||||
struct wlr_dmabuf_attributes *attribs) {
|
||||
bool wlr_output_attach_buffer(struct wlr_output *output,
|
||||
struct wlr_buffer *buffer) {
|
||||
if (output->frame_pending) {
|
||||
wlr_log(WLR_ERROR, "Tried to swap buffers when a frame is pending");
|
||||
return false;
|
||||
|
|
@ -489,15 +489,15 @@ bool wlr_output_set_dmabuf(struct wlr_output *output,
|
|||
output->idle_frame = NULL;
|
||||
}
|
||||
|
||||
if (!output->impl->set_dmabuf) {
|
||||
if (!output->impl->attach_buffer) {
|
||||
return false;
|
||||
}
|
||||
if (!output->impl->set_dmabuf(output, attribs)) {
|
||||
if (!output->impl->attach_buffer(output, buffer)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
output->frame_pending = true;
|
||||
output->needs_swap = false;
|
||||
output->needs_frame = false;
|
||||
pixman_region32_clear(&output->damage);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue