diff options
author | Chia-I Wu <[email protected]> | 2010-01-19 18:39:59 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-01-20 17:44:11 +0800 |
commit | cf22fd5e5b13ccdb02ba0368ea722ede3bbc6de0 (patch) | |
tree | a0d8b791cd341b3108616c31014ef883922d12da /src/egl/main/egldriver.h | |
parent | 925f8113beba03e956351cee6780b1c7ab76add8 (diff) |
egl: Improve driver matching.
Make drv->Probe return a score so that the matching can be done by
finding the driver with the highest score.
Diffstat (limited to 'src/egl/main/egldriver.h')
-rw-r--r-- | src/egl/main/egldriver.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h index eca96fce61d..808b1c3fb70 100644 --- a/src/egl/main/egldriver.h +++ b/src/egl/main/egldriver.h @@ -16,9 +16,22 @@ struct _egl_driver const char *Args; /**< args to load this driver */ const char *Name; /**< name of this driver */ - /**< probe a display to see if it is supported */ - EGLBoolean (*Probe)(_EGLDriver *drv, _EGLDisplay *dpy); - /**< called before dlclose to release this driver */ + + /** + * Probe a display and return a score. + * + * Roughly, + * 50 means the driver supports the display; + * 90 means the driver can accelerate the display; + * 100 means a perfect match. + */ + EGLint (*Probe)(_EGLDriver *drv, _EGLDisplay *dpy); + + /** + * Release the driver resource. + * + * It is called before dlclose(). + */ void (*Unload)(_EGLDriver *drv); _EGLAPI API; /**< EGL API dispatch table */ |