aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2021-09-10 13:25:42 -0400
committerSimon Ser <contact@emersion.fr>2021-09-15 11:50:44 +0200
commit9579d62a160821a107763325a515d3aee0a1e158 (patch)
treee1d13512ccd66012c301c0bdc6604f9ef050639c /include
parent6cb25ebad728612817e3f438c482e04180efe95e (diff)
types/buffer: make {begin,end}_data_ptr_access part of the public API
Diffstat (limited to 'include')
-rw-r--r--include/types/wlr_buffer.h27
-rw-r--r--include/wlr/types/wlr_buffer.h27
2 files changed, 27 insertions, 27 deletions
diff --git a/include/types/wlr_buffer.h b/include/types/wlr_buffer.h
index 6f8d3b1c..bdb6e5b7 100644
--- a/include/types/wlr_buffer.h
+++ b/include/types/wlr_buffer.h
@@ -69,31 +69,4 @@ struct wlr_dmabuf_buffer *dmabuf_buffer_create(
*/
bool dmabuf_buffer_drop(struct wlr_dmabuf_buffer *buffer);
-/**
- * Buffer data pointer access flags.
- */
-enum wlr_buffer_data_ptr_access_flag {
- /**
- * The buffer contents can be read back.
- */
- WLR_BUFFER_DATA_PTR_ACCESS_READ = 1 << 0,
- /**
- * The buffer contents can be written to.
- */
- WLR_BUFFER_DATA_PTR_ACCESS_WRITE = 1 << 1,
-};
-
-/**
- * Get a pointer to a region of memory referring to the buffer's underlying
- * storage. The format and stride can be used to interpret the memory region
- * contents.
- *
- * The returned pointer should be pointing to a valid memory region for the
- * operations specified in the flags. The returned pointer is only valid up to
- * the next buffer_end_data_ptr_access call.
- */
-bool buffer_begin_data_ptr_access(struct wlr_buffer *buffer, uint32_t flags,
- void **data, uint32_t *format, size_t *stride);
-void buffer_end_data_ptr_access(struct wlr_buffer *buffer);
-
#endif
diff --git a/include/wlr/types/wlr_buffer.h b/include/wlr/types/wlr_buffer.h
index 6bf3c97b..60dbb5c3 100644
--- a/include/wlr/types/wlr_buffer.h
+++ b/include/wlr/types/wlr_buffer.h
@@ -138,6 +138,33 @@ void wlr_buffer_register_resource_interface(
struct wlr_buffer *wlr_buffer_from_resource(struct wl_resource *resource);
/**
+ * Buffer data pointer access flags.
+ */
+enum wlr_buffer_data_ptr_access_flag {
+ /**
+ * The buffer contents can be read back.
+ */
+ WLR_BUFFER_DATA_PTR_ACCESS_READ = 1 << 0,
+ /**
+ * The buffer contents can be written to.
+ */
+ WLR_BUFFER_DATA_PTR_ACCESS_WRITE = 1 << 1,
+};
+
+/**
+ * Get a pointer to a region of memory referring to the buffer's underlying
+ * storage. The format and stride can be used to interpret the memory region
+ * contents.
+ *
+ * The returned pointer should be pointing to a valid memory region for the
+ * operations specified in the flags. The returned pointer is only valid up to
+ * the next buffer_end_data_ptr_access call.
+ */
+bool wlr_buffer_begin_data_ptr_access(struct wlr_buffer *buffer, uint32_t flags,
+ void **data, uint32_t *format, size_t *stride);
+void wlr_buffer_end_data_ptr_access(struct wlr_buffer *buffer);
+
+/**
* A client buffer.
*/
struct wlr_client_buffer {