summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-08-25 09:51:54 +0100
committerEmil Velikov <[email protected]>2016-10-14 12:46:09 +0100
commitfdd373acca4a17093d7973c210174c1a12dd7da1 (patch)
treedba35ab745c45906da80de43729a0545c014a6cd
parent665cad16580f4660d8e451cfaa8e5a9def27eb1e (diff)
egl/dri2: micro optimise dri2_bind_extensions()
Do not loop over all matches if we've already found one. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c1
1 files changed, 1 insertions, 0 deletions
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;
}
}
}