Ejemplo n.º 1
0
static void
gst_wl_window_finalize (GObject * gobject)
{
  GstWlWindow *self = GST_WL_WINDOW (gobject);

  if (self->shell_surface)
    wl_shell_surface_destroy (self->shell_surface);

  if (self->video_viewport)
    wp_viewport_destroy (self->video_viewport);

  wl_proxy_wrapper_destroy (self->video_surface_wrapper);
  wl_subsurface_destroy (self->video_subsurface);
  wl_surface_destroy (self->video_surface);

  if (self->area_subsurface)
    wl_subsurface_destroy (self->area_subsurface);

  if (self->area_viewport)
    wp_viewport_destroy (self->area_viewport);

  wl_proxy_wrapper_destroy (self->area_surface_wrapper);
  wl_surface_destroy (self->area_surface);

  g_clear_object (&self->display);

  G_OBJECT_CLASS (gst_wl_window_parent_class)->finalize (gobject);
}
static void
destroy_surfaces (GstGLWindowWaylandEGL * window_egl)
{
  if (window_egl->window.subsurface) {
    wl_subsurface_destroy (window_egl->window.subsurface);
    window_egl->window.subsurface = NULL;
  }
  if (window_egl->window.shell_surface) {
    wl_shell_surface_destroy (window_egl->window.shell_surface);
    window_egl->window.shell_surface = NULL;
  }
  if (window_egl->window.surface) {
    wl_surface_destroy (window_egl->window.surface);
    window_egl->window.surface = NULL;
  }
  if (window_egl->window.native) {
    wl_egl_window_destroy (window_egl->window.native);
    window_egl->window.native = NULL;
  }
}
Ejemplo n.º 3
0
WaylandEGLContext::~WaylandEGLContext ()
{
    if (subsurface)
        wl_subsurface_destroy (subsurface);

    if (region)
        wl_region_destroy (region);

    if (child)
        wl_surface_destroy (child);

    if (egl_context)
        eglDestroyContext (egl_display, egl_context);

    if (egl_surface)
        eglDestroySurface (egl_display, egl_surface);

    if (egl_window)
        wl_egl_window_destroy (egl_window);
}