Call drm_output_render unconditionally, doing an early exit if we're already rendering a client buffer on the primary plane, and asserting for damage on the way out.
Signed-off-by: Daniel Stone <dani...@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1494 --- libweston/compositor-drm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index ed6f971..88a890e 100644 --- a/libweston/compositor-drm.c +++ b/libweston/compositor-drm.c @@ -658,6 +658,11 @@ drm_output_render(struct drm_output *output, pixman_region32_t *damage) struct weston_compositor *c = output->base.compositor; struct drm_backend *b = to_drm_backend(c); + /* If we already have a client buffer promoted to scanout, then we don't + * want to render. */ + if (output->fb_pending) + return; + if (b->use_pixman) drm_output_render_pixman(output, damage); else @@ -728,8 +733,7 @@ drm_output_repaint(struct weston_output *output_base, if (output->disable_pending || output->destroy_pending) return -1; - if (!output->fb_pending) - drm_output_render(output, damage); + drm_output_render(output, damage); if (!output->fb_pending) return -1; -- 2.9.3 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel