mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
buffer: add buffer_create_from_wlr_buffer()
This commit is contained in:
parent
82b0235aca
commit
649773b4f8
2 changed files with 34 additions and 0 deletions
|
|
@ -70,6 +70,13 @@ struct lab_data_buffer *buffer_create_cairo(uint32_t logical_width,
|
|||
struct lab_data_buffer *buffer_create_from_data(void *pixel_data, uint32_t width,
|
||||
uint32_t height, uint32_t stride);
|
||||
|
||||
/*
|
||||
* Create a lab_data_buffer from a wlr_buffer by copying its content.
|
||||
* The wlr_buffer must be backed by shm.
|
||||
*/
|
||||
struct lab_data_buffer *buffer_create_from_wlr_buffer(
|
||||
struct wlr_buffer *wlr_buffer);
|
||||
|
||||
/*
|
||||
* Resize a buffer to the given size. The source buffer is rendered at the
|
||||
* center of the output buffer and shrunk if it overflows from the output buffer.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue