From: Emil Velikov Date: Thu, 25 Aug 2016 08:51:54 +0000 (+0100) Subject: egl/dri2: micro optimise dri2_bind_extensions() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fdd373acca4a17093d7973c210174c1a12dd7da1;p=mesa.git 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 --- 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; } } }