diff options
author | emersion <contact@emersion.fr> | 2018-01-23 22:06:54 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-01-23 22:06:54 +0100 |
commit | 4fa90b05119720a67ccb63cd89246abdb4abf4ea (patch) | |
tree | ee019624271aca1e4ac9560ffc528d4563c01b52 /include/wlr/render.h | |
parent | 03440bbd83b5d68404db8ebc2df310ec0f8c9b32 (diff) |
Backport screenshooter fixes from the renderer redesign v1
This backports some changes to #319 to fix the screenshooter data
format. This also adds wlr_backend_get_renderer which will be
useful to support multiple renderers.
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 5027064d..00088b52 100644 --- a/include/wlr/render.h +++ b/include/wlr/render.h @@ -52,10 +52,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. */ |