On Tue, 25 Sep 2012, Gerd Hoffmann wrote: > Hi, > > While working with the pixman library in the fbdev branch and discussing > patches with Stefano Stabellini I came to the conclusion that it would > be a good idea to: > > (a) use the pixman library not just as vehicle in fbdev, > but as core service for all raster ops in qemu. > (b) do a major cleanup / revamp of the console system in qemu. > > That implies pixman will join zlib and glib as hard dependency, i.e. > qemu will stop building without pixman. > > What is pixman? > > As the name implies it is a library for pixel rendering ops. It is > portable. It's used by Xorg, cairo and spice. On any recent linux > distro you'll find it already installed. When you compile qemu with > spice you'll have a indirect dependency on pixman. Merging anthonys > gtk/cairo patches will add another indirect dependency. > > Even though pixman is used by core linux packages it is still a young > project. On older distros (RHEL-5 for example) it isn't included and > must be compiled manually.
I think that not being in RHEL5 could create lots of problems for many people. For example most Xen virtualization products I know today are based on something from the same era as RHEL5. > What is the console revamp plan? > > (1) Drop DisplayAllocator. Make DisplayChangeListeners support all > important formats directly instead (using pixman), then make gfx > card emulation use qemu_create_displaysurface_from() to give > DisplayChangeListeners direct access to the guests framebuffer. "important formats" should include 24 bpp (repeating here for people that didn't follow the other discussion) > (2) Replace DisplaySurface with pixman_image_t. Gives us reference > counting for free, which simplifies thread usage in ui/ rendering > code. Also makes it easier to use pixman in ui/ code. > > (3) Assign a pixman_image_t to each qemu console. No more redrawing > needed on console switching. vga_hw_invalidate() can be dropped, > screendump code can be simplified. > > (4) API fixes. DisplayChangeListeners don't get a opaque pointer (or > pointer to struct DisplayChangeListener for container_of usage) > for example. opaque pointers are not always necessary or a must have clean up > (5) Investigate optimizations. Such as passing pixman regions to > DisplayChangeListensers, so they get all updates in one go instead > of being called for each rectangle individually. > > Comments?