aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-04-29 22:04:18 +0300
committerDrew DeVault <sir@cmpwn.com>2019-06-07 09:06:11 -0400
commit1d222309b8ad929d01746689b30c2c78cdc12142 (patch)
treebc5bfa23ecdcb2c1d43a43464251ceed6a2adcd3 /include/wlr
parent493804e4215ee23101305e0bf5598bb6f21fb663 (diff)
output: change set_dmabuf to attach_buffer
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/interfaces/wlr_output.h3
-rw-r--r--include/wlr/types/wlr_output.h9
2 files changed, 8 insertions, 4 deletions
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h
index a70c86e6..dc7a76d2 100644
--- a/include/wlr/interfaces/wlr_output.h
+++ b/include/wlr/interfaces/wlr_output.h
@@ -34,8 +34,7 @@ struct wlr_output_impl {
bool (*export_dmabuf)(struct wlr_output *output,
struct wlr_dmabuf_attributes *attribs);
bool (*schedule_frame)(struct wlr_output *output);
- bool (*set_dmabuf)(struct wlr_output *output,
- struct wlr_dmabuf_attributes *attribs);
+ bool (*attach_buffer)(struct wlr_output *output, struct wlr_buffer *buffer);
};
void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 163d54ad..ffe13fb8 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -15,6 +15,7 @@
#include <wayland-server.h>
#include <wayland-util.h>
#include <wlr/render/dmabuf.h>
+#include <wlr/types/wlr_buffer.h>
struct wlr_output_mode {
uint32_t flags; // enum wl_output_mode
@@ -224,6 +225,12 @@ void wlr_output_effective_resolution(struct wlr_output *output,
*/
bool wlr_output_attach_render(struct wlr_output *output, int *buffer_age);
/**
+ * Attach a buffer to the output. Compositors should call `wlr_output_commit`
+ * to submit the new frame.
+ */
+bool wlr_output_attach_buffer(struct wlr_output *output,
+ struct wlr_buffer *buffer);
+/**
* Get the preferred format for reading pixels.
* This function might change the current rendering context.
*/
@@ -243,8 +250,6 @@ bool wlr_output_preferred_read_format(struct wlr_output *output,
*/
void wlr_output_set_damage(struct wlr_output *output,
pixman_region32_t *damage);
-bool wlr_output_set_dmabuf(struct wlr_output *output,
- struct wlr_dmabuf_attributes *attribs);
/**
* Commit the pending output state. If `wlr_output_attach_render` has been
* called, the pending frame will be submitted for display.