drm: Install our fb after drawing to it

If we need to (re)install our fb as the buffer to scan-out of during
flush, then do so after updating our fb contents, rather then before.

This removes another potential source of flickering.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Hans de Goede 2019-10-12 16:31:04 +02:00
parent 70f2ed850b
commit ea71bbfaf7

View file

@ -1614,6 +1614,7 @@ flush_head (ply_renderer_backend_t *backend,
ply_list_node_t *node;
ply_pixel_buffer_t *pixel_buffer;
char *map_address;
bool dirty = false;
assert (backend != NULL);
@ -1645,16 +1646,19 @@ flush_head (ply_renderer_backend_t *backend,
next_node = ply_list_get_next_node (areas_to_flush, node);
if (reset_scan_out_buffer_if_needed (backend, head))
ply_trace ("Needed to reset scan out buffer on %ldx%ld renderer head",
head->area.width, head->area.height);
ply_renderer_head_flush_area (head, area_to_flush, map_address);
dirty = true;
node = next_node;
}
end_flush (backend, head->scan_out_buffer_id);
if (dirty) {
if (reset_scan_out_buffer_if_needed (backend, head))
ply_trace ("Needed to reset scan out buffer on %ldx%ld renderer head",
head->area.width, head->area.height);
end_flush (backend, head->scan_out_buffer_id);
}
ply_region_clear (updated_region);
}