mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 13:38:45 +02:00
drm: flush pending draw to kernel buffer on vt switch
When plymouth's VT is not the foreground VT, we tell the kernel not to scan out from the kernel buffer we manage. Also, we don't bother dispatching rendering to the kernel buffer (since it's not getting scanned out anyway). When plymouth's VT becomes the foreground VT, we tell the kernel to start scanning out from our buffer again. Unfortunately, we neglect to flush all the pending drawing that happens while VT switched away. This means we briefly show stale contents. This commit flushes all pending rendering to the kernel, before resetting the scan out buffer, so we get a current view of the splash shown immediately.
This commit is contained in:
parent
64ccdadae8
commit
171c329f40
1 changed files with 12 additions and 2 deletions
|
|
@ -136,6 +136,8 @@ static bool open_input_source (ply_renderer_backend_t *backend,
|
|||
ply_renderer_input_source_t *input_source);
|
||||
static bool reset_scan_out_buffer_if_needed (ply_renderer_backend_t *backend,
|
||||
ply_renderer_head_t *head);
|
||||
static void flush_head (ply_renderer_backend_t *backend,
|
||||
ply_renderer_head_t *head);
|
||||
|
||||
static bool
|
||||
ply_renderer_head_add_connector (ply_renderer_head_t *head,
|
||||
|
|
@ -465,8 +467,16 @@ activate (ply_renderer_backend_t *backend)
|
|||
next_node = ply_list_get_next_node (backend->heads, node);
|
||||
|
||||
if (head->scan_out_buffer_id != 0)
|
||||
ply_renderer_head_set_scan_out_buffer (backend, head,
|
||||
head->scan_out_buffer_id);
|
||||
{
|
||||
/* Flush out any pending drawing to the buffer
|
||||
*/
|
||||
flush_head (backend, head);
|
||||
|
||||
/* Then send the buffer to the monitor
|
||||
*/
|
||||
ply_renderer_head_set_scan_out_buffer (backend, head,
|
||||
head->scan_out_buffer_id);
|
||||
}
|
||||
|
||||
node = next_node;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue