Commit da1c908a authored by Ander Conselvan de Oliveira's avatar Ander Conselvan de Oliveira Committed by Kristian H. Kristensen

compositor-drm: Add key binding for hidding overlays

Pressing ctrl-alt-o will cause the overlays to be hidden, but surfaces
will still be assigned to different planes. This helps with debugging
of repaint culling below surfaces in other planes.
parent 4bcf3a5f
......@@ -97,6 +97,7 @@ struct drm_compositor {
struct wl_list sprite_list;
int sprites_are_broken;
int sprites_hidden;
int cursors_are_broken;
......@@ -396,7 +397,10 @@ drm_output_repaint(struct weston_output *output_base,
ret = drmModeSetPlane(compositor->drm.fd, s->plane_id,
output->crtc_id, s->pending_fb_id, flags,
compositor->sprites_hidden ?
0 : s->pending_fb_id,
s->dest_x, s->dest_y,
s->dest_w, s->dest_h,
s->src_x, s->src_y,
......@@ -2220,6 +2224,15 @@ find_primary_gpu(struct drm_compositor *ec, const char *seat)
return drm_device;
static void
hide_sprites_binding(struct wl_seat *seat, uint32_t time, uint32_t key,
void *data)
struct drm_compositor *c = data;
c->sprites_hidden ^= 1;
static struct weston_compositor *
drm_compositor_create(struct wl_display *display,
int connector, const char *seat, int tty,
......@@ -2321,6 +2334,10 @@ drm_compositor_create(struct wl_display *display,
weston_compositor_add_key_binding(&ec->base, KEY_O,
hide_sprites_binding, ec);
return &ec->base;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment