From fdd373acca4a17093d7973c210174c1a12dd7da1 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 25 Aug 2016 09:51:54 +0100 Subject: [PATCH] egl/dri2: micro optimise dri2_bind_extensions() Do not loop over all matches if we've already found one. Signed-off-by: Emil Velikov Reviewed-by: Eric Engestrom --- src/egl/drivers/dri2/egl_dri2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index dfc6f0bc22a..c8dfa072be9 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -422,6 +422,7 @@ dri2_bind_extensions(struct dri2_egl_display *dri2_dpy, *(const __DRIextension **) field = extensions[i]; _eglLog(_EGL_INFO, "found extension %s version %d", extensions[i]->name, extensions[i]->version); + break; } } } -- 2.30.2