summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.com>2020-12-07 14:59:44 +0200
committerPekka Paalanen <pekka.paalanen@collabora.com>2021-02-25 12:47:07 +0200
commit7f1a113c895e5690e0a09a0a5079a74b6d65e442 (patch)
tree9e83c38ff7cf4e04002002faa5820d38c632fb96
parent0f7da612eb349349dd6c47b1ee0e912a48d725de (diff)
downloadweston-7f1a113c895e5690e0a09a0a5079a74b6d65e442.tar.gz
drm-backend: do not skip renderer if capturing screen
The renderer must be called for any pending screen capture to complete. Previously this was guaranteed by weston_screenshooter_shoot() forcing full output damage, so damage was never empty. If the future, screenshooting stops inflicting damage, and the damage on the primary plane even after disabling hardware planes may be empty. This patch ensures that screenshots do not get stuck until damage occurs. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-rw-r--r--libweston/backend-drm/drm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c
index 8594594d..1ddf4f7f 100644
--- a/libweston/backend-drm/drm.c
+++ b/libweston/backend-drm/drm.c
@@ -366,9 +366,11 @@ drm_output_render(struct drm_output_state *state, pixman_region32_t *damage)
* If we don't have any damage on the primary plane, and we already
* have a renderer buffer active, we can reuse it; else we pass
* the damaged region into the renderer to re-render the affected
- * area.
+ * area. But, we still have to call the renderer anyway if any screen
+ * capture is pending, otherwise the capture will not complete.
*/
if (!pixman_region32_not_empty(damage) &&
+ wl_list_empty(&output->base.frame_signal.listener_list) &&
scanout_plane->state_cur->fb &&
(scanout_plane->state_cur->fb->type == BUFFER_GBM_SURFACE ||
scanout_plane->state_cur->fb->type == BUFFER_PIXMAN_DUMB)) {