diff options
author | emersion <contact@emersion.fr> | 2018-01-29 23:24:09 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-01-29 23:24:09 +0100 |
commit | 51c22d39a4a1a3c4ecfe39ee3df90ba7e66633af (patch) | |
tree | b9fd9fd6fddc8a869f3500bf92944b47c01c578c /include/wlr/render.h | |
parent | 2cc989e09716eed5974dc9a76b7b6dbee9c3d730 (diff) | |
parent | ed5b1fdedd775a7acec3d6814cc2ac007e34fd29 (diff) |
Merge remote-tracking branch 'upstream/master' into output-damage
Diffstat (limited to 'include/wlr/render.h')
-rw-r--r-- | include/wlr/render.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/wlr/render.h b/include/wlr/render.h index bfd9e829..46ee0fa3 100644 --- a/include/wlr/render.h +++ b/include/wlr/render.h @@ -56,10 +56,17 @@ const enum wl_shm_format *wlr_renderer_get_formats( bool wlr_renderer_buffer_is_drm(struct wlr_renderer *renderer, struct wl_resource *buffer); /** - * Reads pixels and stores them in out_data as ARGB8888. + * Reads out of pixels of the currently bound surface into data. `stride` is in + * bytes. */ -void wlr_renderer_read_pixels(struct wlr_renderer *r, int x, int y, - int width, int height, void *out_data); +bool wlr_renderer_read_pixels(struct wlr_renderer *r, enum wl_shm_format fmt, + uint32_t stride, uint32_t width, uint32_t height, + uint32_t src_x, uint32_t src_y, uint32_t dst_x, uint32_t dst_y, void *data); +/** + * Checks if a format is supported. + */ +bool wlr_renderer_format_supported(struct wlr_renderer *r, + enum wl_shm_format fmt); /** * Destroys this wlr_renderer. Textures must be destroyed separately. */ |