aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorGwan-gyeong Mun <[email protected]>2017-07-18 00:03:14 +0900
committerEmil Velikov <[email protected]>2017-07-19 13:06:50 +0100
commit7c8958555176adf7b3647fc8e94e86faeccb28c4 (patch)
tree6cd22713ffea2c081b9de1c65d39e34bbc7bbe0b /src/egl
parent89505f7eade77cef0e09d7a3f07c4629c3d3f751 (diff)
egl/drm: add going out of the loop when the designated buffer is found
Because the color_buffers have a each unique bo, if the designated buffer is found, release_buffer() can go out the loop which seaches the buffer. Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/platform_drm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index 8e12aed0b32..86d15fa3d59 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -72,6 +72,7 @@ release_buffer(struct gbm_surface *_surf, struct gbm_bo *bo)
for (unsigned i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
if (dri2_surf->color_buffers[i].bo == bo) {
dri2_surf->color_buffers[i].locked = false;
+ break;
}
}
}