egl: Simplify driver matching.

Add initialization options that drv->API.Initialize should support.
Replace drv->Probe by TestOnly initialization option and simplify
_eglMatchDriver.
This commit is contained in:
Chia-I Wu
2011-01-13 00:27:45 +08:00
parent a4a38dcf61
commit 655e459892
6 changed files with 74 additions and 102 deletions

View File

@@ -90,6 +90,11 @@ struct _egl_display
_EGLDriver *Driver; /**< Matched driver of the display */
EGLBoolean Initialized; /**< True if the display is initialized */
/* options that affect how the driver initializes the display */
struct {
EGLBoolean TestOnly; /**< Driver should not set fields when true */
} Options;
/* these fields are set by the driver during init */
void *DriverData; /**< Driver private data */
EGLint VersionMajor; /**< EGL major version */