Module: Mesa Branch: master Commit: 7c8958555176adf7b3647fc8e94e86faeccb28c4 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7c8958555176adf7b3647fc8e94e86faeccb28c4
Author: Gwan-gyeong Mun <elong...@gmail.com> Date: Tue Jul 18 00:03:14 2017 +0900 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 <elong...@gmail.com> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- src/egl/drivers/dri2/platform_drm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index 8e12aed0b3..86d15fa3d5 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; } } } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit