qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 23/25] console: make screendump async


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH v2 23/25] console: make screendump async
Date: Fri, 20 Jan 2017 13:07:51 +0000

Hi

On Thu, Jan 19, 2017 at 12:21 PM Gerd Hoffmann <address@hidden> wrote:

> On Mi, 2017-01-18 at 20:03 +0400, Marc-André Lureau wrote:
> > +    surface = qemu_console_surface(con);
> > +
> > +    /* FIXME: async save with coroutine? it would have to copy or
> > lock
> > +     * the surface. */
> > +    ppm_save(filename, surface, &err);
> > +
>
> No need to lock or copy.
>
> ppm_save() uses the pixman image (surface->image) only anyway, so
> changing it to accept a pixman image instead of the surface is easy.
>
> pixman images are reference counted, so you can just grab a reference
> using pixman_image_ref() and run with it, without risking it'll be
> released underneath your feet, then unref when done.
>
>
If you only ref, you could have the image being modified while it is being
saved asynchronously, this could result in tearing artefacts, no?

-- 
Marc-André Lureau


reply via email to

[Prev in Thread] Current Thread [Next in Thread]