mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-09 11:48:02 +02:00
gl-renderer: Skip non-dummy rbs in get_dummy_renderbuffer()
No backends currently create FBO or dma-buf renderbuffers on outputs associated to a window. This is theoretically possible though and should be allowed by the GL renderer. This commit prevents output_get_dummy_renderbuffer() from mixing up renderbuffer types. Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
parent
47035a776c
commit
2bfaac0f5c
1 changed files with 11 additions and 9 deletions
|
|
@ -2183,15 +2183,17 @@ output_get_dummy_renderbuffer(struct weston_output *output)
|
|||
int max_buffers;
|
||||
|
||||
wl_list_for_each(rb, &go->renderbuffer_list, link) {
|
||||
/* Count dummy renderbuffers, age them, */
|
||||
count++;
|
||||
rb->age++;
|
||||
/* find the one with buffer_age to return, */
|
||||
if (rb->age == buffer_age)
|
||||
ret = rb;
|
||||
/* and the oldest one in case we decide to reuse it. */
|
||||
if (!oldest_rb || rb->age > oldest_rb->age)
|
||||
oldest_rb = rb;
|
||||
if (rb->type == RENDERBUFFER_DUMMY) {
|
||||
/* Count dummy renderbuffers, age them, */
|
||||
count++;
|
||||
rb->age++;
|
||||
/* find the one with buffer_age to return, */
|
||||
if (rb->age == buffer_age)
|
||||
ret = rb;
|
||||
/* and the oldest one in case we decide to reuse it. */
|
||||
if (!oldest_rb || rb->age > oldest_rb->age)
|
||||
oldest_rb = rb;
|
||||
}
|
||||
}
|
||||
|
||||
/* If a renderbuffer of correct age was found, return it, */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue