egl: Expose .._has_extensions_..() function

It will be used by e.g. a future GLES helper unit needing similar
functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=785381
This commit is contained in:
Jonas Ådahl 2017-07-24 15:56:59 +08:00
parent 362e26b3e2
commit b32cccddf9
2 changed files with 21 additions and 13 deletions

View File

@ -160,11 +160,11 @@ set_egl_error (GError **error)
error_str);
}
static gboolean
extensions_string_has_extensions_valist (const char *extensions_str,
char ***missing_extensions,
char *first_extension,
va_list var_args)
gboolean
meta_extensions_string_has_extensions_valist (const char *extensions_str,
char ***missing_extensions,
char *first_extension,
va_list var_args)
{
char **extensions;
char *extension;
@ -222,10 +222,11 @@ meta_egl_has_extensions (MetaEgl *egl,
}
va_start (var_args, first_extension);
has_extensions = extensions_string_has_extensions_valist (extensions_str,
missing_extensions,
first_extension,
var_args);
has_extensions =
meta_extensions_string_has_extensions_valist (extensions_str,
missing_extensions,
first_extension,
var_args);
va_end (var_args);
return has_extensions;
@ -479,10 +480,11 @@ meta_egl_egl_device_has_extensions (MetaEgl *egl,
}
va_start (var_args, first_extension);
has_extensions = extensions_string_has_extensions_valist (extensions_str,
missing_extensions,
first_extension,
var_args);
has_extensions =
meta_extensions_string_has_extensions_valist (extensions_str,
missing_extensions,
first_extension,
var_args);
va_end (var_args);
return has_extensions;

View File

@ -36,6 +36,12 @@ G_DECLARE_FINAL_TYPE (MetaEgl, meta_egl, META, EGL, GObject)
GQuark meta_egl_error_quark (void);
gboolean
meta_extensions_string_has_extensions_valist (const char *extensions_str,
char ***missing_extensions,
char *first_extension,
va_list var_args);
gboolean meta_egl_has_extensions (MetaEgl *egl,
EGLDisplay display,
char ***missing_extensions,