From c563d79efaf3e6645add6617b0944c41b9775161 Mon Sep 17 00:00:00 2001
|
From: Jeffy Chen <jeffy.chen@rock-chips.com>
|
Date: Mon, 3 Dec 2018 10:40:16 +0800
|
Subject: [PATCH 11/74] compositor: Support freezing display
|
|
Freeze display when the specified file(from env "WESTON_FREEZE_DISPLAY")
|
exists.
|
|
For example:
|
export WESTON_FREEZE_DISPLAY=/tmp/.freeze
|
touch $WESTON_FREEZE_DISPLAY
|
weston --tty=2 -Bdrm-backend.so&
|
|
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
|
---
|
libweston/compositor.c | 6 ++++++
|
1 file changed, 6 insertions(+)
|
|
diff --git a/libweston/compositor.c b/libweston/compositor.c
|
index 9579493..f36ec9b 100644
|
--- a/libweston/compositor.c
|
+++ b/libweston/compositor.c
|
@@ -3076,6 +3076,11 @@ output_repaint_timer_handler(void *data)
|
void *repaint_data = NULL;
|
int ret = 0;
|
|
+ if (!access(getenv("WESTON_FREEZE_DISPLAY") ? : "", F_OK)) {
|
+ usleep(DEFAULT_REPAINT_WINDOW * 1000);
|
+ goto out;
|
+ }
|
+
|
weston_compositor_read_presentation_clock(compositor, &now);
|
compositor->last_repaint_start = now;
|
|
@@ -3108,6 +3113,7 @@ output_repaint_timer_handler(void *data)
|
wl_list_for_each(output, &compositor->output_list, link)
|
output->repainted = false;
|
|
+out:
|
output_repaint_timer_arm(compositor);
|
|
return 0;
|
--
|
2.20.1
|