qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC v4 6/9] qxl: remove flipped


From: Alon Levy
Subject: Re: [Qemu-devel] [RFC v4 6/9] qxl: remove flipped
Date: Wed, 22 Feb 2012 21:00:04 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Feb 22, 2012 at 03:09:09PM +0100, Gerd Hoffmann wrote:
> On 02/22/12 13:28, Alon Levy wrote:
> > On Wed, Feb 22, 2012 at 12:18:50PM +0100, Gerd Hoffmann wrote:
> >>   Hi,
> >>
> >> It's not obvious to me how the non-flipped case (qxl_stride > 0) is
> >> handled now.  Have you tested this with both windows+linux guests?
> > 
> > It isn't handled. The simplest way is just to if on the stride and do a
> > single memcpy instead of individual line memcpy.
> 
> Single memcpy works only for full scanlines.  qxl_flip can be extended
> to handle both cases (and should probably also renamed then).
> 
> > This of course means we
> > are doing a redundant copy,
> 
> No.  You can wrap the qxl_flip call into ...
> 
>   if (is_shared_buffer()) { ... }.
> 
> ... to skip the copy if it isn't needed.
> 
> > since using our own DisplayAllocator or just
> > the existing deallocate + our own allocate of ds->surface->data removes
> > one copy.
> 
> I would just do
> 
>   if (qxl_stride > 0) {
>      qemu_free_displaysurface
>      qemu_create_displaysurface_from
>   } else {
>      qemu_resize_displaysurface
>   }
> 

Ok, this all works fine, thanks, just one note - linux qxl also uses
negative stride, so actually there is no user for positive stride (and
hence that code path is untested).

> cheers,
>   Gerd
> 



reply via email to

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