drm: Remove explicit set_scan_out_buffer() from activate()

flush_head() already sets the scan-out buffer if necessary and if it is not
necessary then we do not want to do this. Specifically second and later heads
do not yet have their buffer drawn to when activate gets called from the
map_to_device call for the first head and then we do not want to start
scanning out the uninitialized buffer.

Removing the explicit ply_renderer_head_set_scan_out_buffer() call also
allows removing the if (head->scan_out_buffer_id != 0) check,
flush_head() already checks this itself.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
calculate-0.9.5
Hans de Goede 5 years ago
parent e0928370b6
commit b293882d7c

@ -947,16 +947,8 @@ activate (ply_renderer_backend_t *backend)
head = (ply_renderer_head_t *) ply_list_node_get_data (node);
next_node = ply_list_get_next_node (backend->heads, node);
if (head->scan_out_buffer_id != 0) {
/* 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);
}
/* Flush out any pending drawing to the buffer */
flush_head (backend, head);
node = next_node;
}

Loading…
Cancel
Save