qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/5] ramfb: add sanity checks to ramfb_create_display_surface


From: Gerd Hoffmann
Subject: Re: [PATCH 4/5] ramfb: add sanity checks to ramfb_create_display_surface
Date: Wed, 29 Apr 2020 10:51:25 +0200

  Hi,

> > Not fully sure we can do that without breaking something, might be a
> > negative stride is used for upside down images (last scanline comes
> > first in memory).
> 
> Ugh... Upside down images???... Well, OK, I guess. :)

Well, in the unix world (x11, wayland) x=0,y=0 is the upper left corner.
In the windows world x=0,y=0 is the lower left corner, in opengl too.
If you don't handle this correctly your guest display might show up
upside down ;)

qxl uses negative strides to signal that.  Looking at the code I see qxl
handles this locally (grep for qxl_stride in qxl-render.c), it doesn't
propagate into ui/console.c, so it should be safe to change the
qemu_create_displaysurface_from() arguments to unsigned from qxl point
of view.

take care,
  Gerd




reply via email to

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