On 05/25/2010 08:11 AM, Gerd Hoffmann wrote:
>> - You should register a Display Allocator and override the
>> create_displaysurface() method like I did in the DirectFB driver.
>> This way you save qemu a data copy. fbdev_render_32() should only be
>> used when the guest framebuffer is not compatible with the physical
>> framebuffer (guest_bpp != physical_bbp || guest_linesize !=
>> physical_linesize).
> 
> Isn't a trivial move though.  If the console is switched you must stop 
> drawing on the framebuffer.
> 
> Right now this is easy: just stop copying.  Likewise restoring the 
> screen when switching back is easy: just copy everything.
> 
> If we give out pointers to the framebuffer to other qemu code which 
> doesn't know anything about console switching we have to be quite 
> careful get things right ...
> 

When loosing the focus, you can force display surface reallocation by calling 
hw_invalidate(), this way you can give qemu a temporary pointer to prevent 
drawing on the framebuffer.
When switching back, you just have to copy the content of the temporary pointer 
location to the framebuffer.


Cheers, 
  Julian Pidancet


Reply via email to