mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-19 01:58:24 +02:00
egl/gbm: Use local variable for better readability in get_back_bo
No functional change intended. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42111>
This commit is contained in:
parent
ab8e57cf31
commit
5fdaab9ef8
1 changed files with 7 additions and 5 deletions
|
|
@ -251,16 +251,18 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
|
|||
|
||||
if (dri2_surf->back == NULL) {
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
|
||||
if (!dri2_surf->color_buffers[i].locked &&
|
||||
dri2_surf->current != &dri2_surf->color_buffers[i]) {
|
||||
int age = dri2_surf->color_buffers[i].age;
|
||||
struct dri2_egl_buffer *buffer = &dri2_surf->color_buffers[i];
|
||||
|
||||
if (dri2_surf->color_buffers[i].bo &&
|
||||
if (!buffer->locked &&
|
||||
dri2_surf->current != buffer) {
|
||||
int age = buffer->age;
|
||||
|
||||
if (buffer->bo &&
|
||||
(!min_age || age < min_age))
|
||||
min_age = age;
|
||||
|
||||
if (!max_age || age > max_age) {
|
||||
dri2_surf->back = &dri2_surf->color_buffers[i];
|
||||
dri2_surf->back = buffer;
|
||||
max_age = age;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue