Flush display commands before validating the surface.

This fixes a display glitch in xspice which is caused when
a surface create is queued, but then a direct call to update
the area is issued.  Unless we flush the queue, the surface
does not exist, and we fail.

Signed-off-by: Jeremy White <jwhite@codeweavers.com>
This commit is contained in:
Jeremy White 2015-12-08 09:11:08 -06:00 committed by Christophe Fergeau
parent aa09f04717
commit f44a63b8ec

View File

@ -11052,12 +11052,13 @@ void handle_dev_update(void *opaque, void *payload)
QXLRect *qxl_dirty_rects = msg->qxl_dirty_rects;
uint32_t clear_dirty_region = msg->clear_dirty_region;
flush_display_commands(worker);
VALIDATE_SURFACE_RET(worker, surface_id);
rect = spice_new0(SpiceRect, 1);
surface = &worker->surfaces[surface_id];
red_get_rect_ptr(rect, qxl_area);
flush_display_commands(worker);
spice_assert(worker->running);