Lines Matching refs:disp_surface
569 struct dwl_surface *disp_surface = in dwl_context_surface_new() local
572 if (!disp_surface) in dwl_context_surface_new()
574 disp_surface->context = self; in dwl_context_surface_new()
575 disp_surface->width = width; in dwl_context_surface_new()
576 disp_surface->height = height; in dwl_context_surface_new()
577 disp_surface->scale = DEFAULT_SCALE; in dwl_context_surface_new()
578 disp_surface->buffer_count = buffer_count; in dwl_context_surface_new()
597 disp_surface->buffers[i] = buffer; in dwl_context_surface_new()
601 wl_buffer_add_listener(disp_surface->buffers[i], in dwl_context_surface_new()
602 &surface_buffer_listener, disp_surface); in dwl_context_surface_new()
604 disp_surface->surface = in dwl_context_surface_new()
606 if (!disp_surface->surface) { in dwl_context_surface_new()
611 wl_surface_add_listener(disp_surface->surface, &surface_listener, in dwl_context_surface_new()
612 disp_surface); in dwl_context_surface_new()
620 wl_surface_set_opaque_region(disp_surface->surface, region); in dwl_context_surface_new()
623 disp_surface->xdg = zxdg_shell_v6_get_xdg_surface( in dwl_context_surface_new()
624 self->ifaces.xdg_shell, disp_surface->surface); in dwl_context_surface_new()
625 if (!disp_surface->xdg) { in dwl_context_surface_new()
630 disp_surface->toplevel = in dwl_context_surface_new()
631 zxdg_surface_v6_get_toplevel(disp_surface->xdg); in dwl_context_surface_new()
632 if (!disp_surface->toplevel) { in dwl_context_surface_new()
637 zxdg_toplevel_v6_set_title(disp_surface->toplevel, "crosvm"); in dwl_context_surface_new()
638 zxdg_toplevel_v6_add_listener(disp_surface->toplevel, in dwl_context_surface_new()
639 &toplevel_listener, disp_surface); in dwl_context_surface_new()
641 zxdg_surface_v6_add_listener(disp_surface->xdg, in dwl_context_surface_new()
645 disp_surface->aura = zaura_shell_get_aura_surface( in dwl_context_surface_new()
646 self->ifaces.aura, disp_surface->surface); in dwl_context_surface_new()
647 if (!disp_surface->aura) { in dwl_context_surface_new()
652 disp_surface->aura, in dwl_context_surface_new()
657 wl_surface_commit(disp_surface->surface); in dwl_context_surface_new()
662 disp_surface->subsurface = wl_subcompositor_get_subsurface( in dwl_context_surface_new()
663 self->ifaces.subcompositor, disp_surface->surface, in dwl_context_surface_new()
665 if (!disp_surface->subsurface) { in dwl_context_surface_new()
669 wl_subsurface_set_desync(disp_surface->subsurface); in dwl_context_surface_new()
673 disp_surface->viewport = wp_viewporter_get_viewport( in dwl_context_surface_new()
674 self->ifaces.viewporter, disp_surface->surface); in dwl_context_surface_new()
675 if (!disp_surface->viewport) { in dwl_context_surface_new()
681 wl_surface_attach(disp_surface->surface, disp_surface->buffers[0], 0, in dwl_context_surface_new()
683 wl_surface_damage(disp_surface->surface, 0, 0, width, height); in dwl_context_surface_new()
698 surface_enter(disp_surface, disp_surface->surface, in dwl_context_surface_new()
703 wl_surface_commit(disp_surface->surface); in dwl_context_surface_new()
706 return disp_surface; in dwl_context_surface_new()
708 if (disp_surface->viewport) in dwl_context_surface_new()
709 wp_viewport_destroy(disp_surface->viewport); in dwl_context_surface_new()
710 if (disp_surface->subsurface) in dwl_context_surface_new()
711 wl_subsurface_destroy(disp_surface->subsurface); in dwl_context_surface_new()
712 if (disp_surface->toplevel) in dwl_context_surface_new()
713 zxdg_toplevel_v6_destroy(disp_surface->toplevel); in dwl_context_surface_new()
714 if (disp_surface->xdg) in dwl_context_surface_new()
715 zxdg_surface_v6_destroy(disp_surface->xdg); in dwl_context_surface_new()
716 if (disp_surface->aura) in dwl_context_surface_new()
717 zaura_surface_destroy(disp_surface->aura); in dwl_context_surface_new()
720 if (disp_surface->surface) in dwl_context_surface_new()
721 wl_surface_destroy(disp_surface->surface); in dwl_context_surface_new()
723 if (disp_surface->buffers[i]) in dwl_context_surface_new()
724 wl_buffer_destroy(disp_surface->buffers[i]); in dwl_context_surface_new()
727 free(disp_surface); in dwl_context_surface_new()