[Spice-devel] [RFC v4 8/9] qxl: make qxl_render_update async

Gerd Hoffmann kraxel at redhat.com
Wed Feb 22 03:41:01 PST 2012


  Hi,

> +    qxl->render_update_redraw_area.left   = 0;
> +    qxl->render_update_redraw_area.right  =
> +        qxl->guest_primary.surface.width;
> +    qxl->render_update_redraw_area.top    = 0;
> +    qxl->render_update_redraw_area.bottom =
> +        qxl->guest_primary.surface.height;

Are there cases where render_update_redraw_area != full screen?

> +    qemu_mutex_lock(&qxl->ssd.lock);
> +    if (qxl->render_update_redraw) {
> +        /* don't bother copying them over since we will ignore them */
> +        qxl->num_dirty_rects += num_updated_rects;
> +        dprint(qxl, 1, "%s: scheduling update_area_bh, #dirty %d\n",
> +               __func__, qxl->num_dirty_rects);
> +        qemu_bh_schedule(qxl->update_area_bh);
> +        qemu_mutex_unlock(&qxl->ssd.lock);
> +        return;
> +    }
> +    if (qxl->num_dirty_rects + num_updated_rects > QXL_NUM_DIRTY_RECTS) {
> +        /*
> +         * overflow - merge all remaining rects. Hoping this is not
> +         * common so doesn't need to be optimized
> +         */
> +    }

Another easy way out is to simply set qxl->render_update_redraw = 1.

cheers,
  Gerd


More information about the Spice-devel mailing list