[cairo] Road to 1.10
Chris Wilson
chris at chris-wilson.co.uk
Mon Feb 16 02:06:15 PST 2009
On Sun, 2009-02-15 at 17:37 +0200, M Joonas Pihlaja wrote:
> Regarding the SDL backend, could we drop it before it gets any more
> use? While it certainly makes cairo/SDL integration a bit easier,
> it's not really doing all that much, but does have its own set of
> problems in turn:
Thank you Joonas for bringing this up. As the fool who added the SDL
surface in the first place, I completely agree with your assessment that
it is flawed and we should remove it before making a release.
I think the basic mistake I made is that SDL is not a fundamental
graphics layer, i.e. its purpose is to provide a consistent, yet simple,
layer over top of another API such as xlib, win32, OpenGL. As such the
SDL integration library should instead be creating a native surface for
the underlying acceleration architecture and then providing facilities
for using that surface within SDL.
On a more wider topic, having played with wayland and creating a
cairo-based compositor, we sorely lack the ability to use a
non-premultiplied source (such as an OpenGL window, or SDL surface as
above). CAIRO_FORMAT_ARGB32_NON_PREMULTIPLIED_SOURCE - hideous, but
fairly trivial to handle in a shader. (Slightly more work to add the
extra code paths to pixman though!)
Thoughts? Does cairo target compositors? (Though comparing the code to
write a wayland compositor using eagle/OpenGL and one using cairo, cairo
is far more elegant and clearly expressive. A natural fit, since
compositing is what cairo does! ;-)
-ickle
More information about the cairo
mailing list