mirror of
https://github.com/brl/mutter.git
synced 2025-08-05 08:04:50 +00:00
renderer-native: Always use MetaEgl when interacting with EGL
Partly for consistency, partly for error handling functionality. https://bugzilla.gnome.org/show_bug.cgi?id=785381
This commit is contained in:
@@ -290,6 +290,27 @@ meta_egl_choose_config (MetaEgl *egl,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
EGLSurface
|
||||
meta_egl_create_window_surface (MetaEgl *egl,
|
||||
EGLDisplay display,
|
||||
EGLConfig config,
|
||||
EGLNativeWindowType native_window_type,
|
||||
const EGLint *attrib_list,
|
||||
GError **error)
|
||||
{
|
||||
EGLSurface surface;
|
||||
|
||||
surface = eglCreateWindowSurface (display, config,
|
||||
native_window_type, attrib_list);
|
||||
if (surface == EGL_NO_SURFACE)
|
||||
{
|
||||
set_egl_error (error);
|
||||
return EGL_NO_SURFACE;
|
||||
}
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
EGLSurface
|
||||
meta_egl_create_pbuffer_surface (MetaEgl *egl,
|
||||
EGLDisplay display,
|
||||
@@ -309,6 +330,21 @@ meta_egl_create_pbuffer_surface (MetaEgl *egl,
|
||||
return surface;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_egl_destroy_surface (MetaEgl *egl,
|
||||
EGLDisplay display,
|
||||
EGLSurface surface,
|
||||
GError **error)
|
||||
{
|
||||
if (!eglDestroySurface (display, surface))
|
||||
{
|
||||
set_egl_error (error);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_egl_proc_valid_real (void *proc,
|
||||
const char *proc_name,
|
||||
@@ -353,6 +389,20 @@ meta_egl_get_platform_display (MetaEgl *egl,
|
||||
return display;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_egl_terminate (MetaEgl *egl,
|
||||
EGLDisplay display,
|
||||
GError **error)
|
||||
{
|
||||
if (!eglTerminate (display))
|
||||
{
|
||||
set_egl_error (error);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
EGLImageKHR
|
||||
meta_egl_create_image (MetaEgl *egl,
|
||||
EGLDisplay display,
|
||||
|
Reference in New Issue
Block a user