drm: Mark buffer as clean in ply_renderer_head_new()

We do not want to set our buffer as scanout source before it has been
drawn to by the splash, to avoid a flicker caused by us installing a
black buffer for scanout.

To avoid this, flush_head() only calls reset_scan_out_buffer() if the buffer
for the head has updated_areas, iow if it already has been drawn to.

Our ply_pixel_buffer_fill_with_color() call in ply_renderer_head_new()
causes updated_areas to be non-empty, triggering a reset_scan_out_buffer()
call before the buffer has been drawn at least once.

This commit fixes this by clearing the updated_areas after the
ply_pixel_buffer_fill_with_color() call.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Hans de Goede 2019-10-21 16:05:56 +02:00
parent b3d42bd5e2
commit e0928370b6

View file

@ -644,6 +644,8 @@ ply_renderer_head_new (ply_renderer_backend_t *backend,
ply_trace ("Creating %ldx%ld renderer head", head->area.width, head->area.height);
ply_pixel_buffer_fill_with_color (head->pixel_buffer, NULL,
0.0, 0.0, 0.0, 1.0);
/* Delay flush till first actual draw */
ply_region_clear (ply_pixel_buffer_get_updated_areas (head->pixel_buffer));
if (output->connector_type == DRM_MODE_CONNECTOR_LVDS ||
output->connector_type == DRM_MODE_CONNECTOR_eDP ||