]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
drm: Mark buffer as clean in ply_renderer_head_new()
authorHans de Goede <hdegoede@redhat.com>
Mon, 21 Oct 2019 14:05:56 +0000 (16:05 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 21 Oct 2019 14:49:44 +0000 (16:49 +0200)
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>
src/plugins/renderers/drm/plugin.c

index 32ed4d114e3ae0b32c31042cd980778fd74fa334..b1e0ed61f18d1194e6d38066264016239e9d866f 100644 (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 ||