qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] sdl zooming


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] sdl zooming
Date: Wed, 24 Jun 2009 07:41:17 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Stefano Stabellini wrote:
Hi all,
this patch implements zooming capabilities for the sdl interface.
A new sdl_zoom_blit function is added that is able to scale and blit a
portion of a surface into another.
This way we can enable SDL_RESIZABLE and have a real_screen surface with
a different size than the guest surface and let sdl_zoom_blit take care
of the problem.

Signed-off-by: Stefano Stabellini <address@hidden>

Hi Stefano,

First, really neat patch. I was looking at this recently myself. I cannot tell quickly from looking at the code--perhaps not enough caffeine yet this morning. Is this nearest neighbor with some sort of smoothing mechanism on top?

In my experiences with scaling VM displays, bilinear interpolation seems to fit the use case here well as it does best from 1.0-2.0x which is more or less what you'll commonly see.

Bilinear interpolation can be implemented rather effectively on most processors and is usually hardware supported too. That suggests that using a library is the right approach to avoid maintaining platform-specific code.

Cairo seems to be a good choice. It integrates well with SDL and is portable to all of the platforms we care about. It's a very simple API too for scaling. We use it in gtk-vnc and it has proven to be very good for this task.

What do you think?

http://cairographics.org/SDL/

Regards,

Anthony Liguori




reply via email to

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