mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
render: use DRM formats in wlr_renderer_read_pixels
This commit is contained in:
parent
00bf6674b3
commit
b54ef3372d
6 changed files with 9 additions and 8 deletions
|
|
@ -467,14 +467,14 @@ static uint32_t gles2_preferred_read_format(
|
|||
}
|
||||
|
||||
static bool gles2_read_pixels(struct wlr_renderer *wlr_renderer,
|
||||
enum wl_shm_format wl_fmt, uint32_t *flags, uint32_t stride,
|
||||
uint32_t drm_format, uint32_t *flags, 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) {
|
||||
struct wlr_gles2_renderer *renderer =
|
||||
gles2_get_renderer_in_context(wlr_renderer);
|
||||
|
||||
const struct wlr_gles2_pixel_format *fmt =
|
||||
get_gles2_format_from_drm(convert_wl_shm_format_to_drm(wl_fmt));
|
||||
get_gles2_format_from_drm(drm_format);
|
||||
if (fmt == NULL) {
|
||||
wlr_log(WLR_ERROR, "Cannot read pixels: unsupported pixel format");
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ const struct wlr_drm_format_set *wlr_renderer_get_dmabuf_render_formats(
|
|||
return r->impl->get_dmabuf_render_formats(r);
|
||||
}
|
||||
|
||||
bool wlr_renderer_read_pixels(struct wlr_renderer *r, enum wl_shm_format fmt,
|
||||
bool wlr_renderer_read_pixels(struct wlr_renderer *r, uint32_t fmt,
|
||||
uint32_t *flags, 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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue