compositor-drm: Only request vblank events if needed

If the sprite is disabled and we're not enabling it on the next frame,
nothing is done in the vblank handler, so there's no need to ask for a
vblank event.
This commit is contained in:
Ander Conselvan de Oliveira 2012-11-09 14:19:03 +02:00 committed by Kristian Høgsberg
parent 3b2bd44d92
commit 2f7a30b07e

View file

@ -391,7 +391,8 @@ drm_output_repaint(struct weston_output *output_base,
.request.sequence = 1,
};
if (!drm_sprite_crtc_supported(output_base, s->possible_crtcs))
if ((!s->fb_id && !s->pending_fb_id) ||
!drm_sprite_crtc_supported(output_base, s->possible_crtcs))
continue;
ret = drmModeSetPlane(compositor->drm.fd, s->plane_id,