mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
output: add wlr_output_preferred_read_format()
The read format is dependent on the output, so we first need to make it current. This fixes a race condition in wlr-screencopy-v1 where a dmabuf client would cause EGL_NO_SURFACE to be bound at the time when screencopy needs to query for the preferred format, causing GL errors.
This commit is contained in:
parent
c70b8f64b7
commit
fb5691b6cc
5 changed files with 22 additions and 15 deletions
|
|
@ -96,11 +96,6 @@ int wlr_renderer_get_dmabuf_formats(struct wlr_renderer *renderer,
|
|||
*/
|
||||
int wlr_renderer_get_dmabuf_modifiers(struct wlr_renderer *renderer, int format,
|
||||
uint64_t **modifiers);
|
||||
/**
|
||||
* Get the preferred format for reading pixels.
|
||||
*/
|
||||
bool wlr_renderer_preferred_read_format(struct wlr_renderer *renderer,
|
||||
enum wl_shm_format *fmt);
|
||||
/**
|
||||
* Reads out of pixels of the currently bound surface into data. `stride` is in
|
||||
* bytes.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue