summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2016-11-01 21:43:39 +0000
committerDaniel Stone <daniels@collabora.com>2017-02-07 19:16:31 +0000
commit091462606ecc166f54bc6d6afea1cdc4e8b5e753 (patch)
treef97987ac30263275308143fffc9d9178329f72f7
parente38d5a06baaab39715a857390bb32bfef518dd68 (diff)
compositor-drm: Reshuffle drm_output_render
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. Differential Revision: https://phabricator.freedesktop.org/D1494 Signed-off-by: Daniel Stone <daniels@collabora.com>
-rw-r--r--libweston/compositor-drm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 3208c79a..dcb40d1f 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -671,6 +671,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
@@ -742,8 +747,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;