[Freeciv-Dev] Re: (PR#15055) RFC: Cairo to replace the canvas functions
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15055 >
On 1/3/06, Jason Short <jdorje@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=15055 >
>
> - For gui-sdl it may be harder. What's needed is a sdlcairo library
> corresponding to the gdkcairo one. Hopefully such a thing exists; if
> not it really should.
Hello Jason,
Even if there isn't one, I believe Cairo supports offscreen drawing to a
buffer? Then this buffer could be copied into an SDLSurface.
It would probably be slow though.
> - Potentially buggy and non-portable. Cairo is a very young library.
> However it is very actively maintained (unlike some libraries I can
> mention) since it is the backend for GTK/GDK on which a vast amount of
> production-level OSS depends.
I think the Mozilla SVG plugin also uses it.
> - It gives us scaling "for free". Well, it might be slower (depending
> on the rendering backend), but it should only take one line of code in
> the drawing section to do scaling.
>
> - A lot of code (all the canvas and sprite functions) go away.
>
> - Better results for some backends. For instance gui-xaw would get
> anti-aliased text and alpha support. gui-win32 under win98 probably
> would too. gui-gtk would get anti-aliased versions of many functions
> (like canvas_put_line).
Less code means less bugs and less work to maintain the code in our
part, so I am in favour of it.
> - Potential hardware acceleration. Cairo is designed specifically with
> backend hardware acceleration (through opengl/glitz) in mind. Support
> for this is very weak at the moment, but becuase cairo is actively
> maintained and soon to be put into production use I doubt it will remain
> so. Once the glitz backend is effectively working and well-supported,
> we could get hardware acceleration *for free* in the gtk backend, or
> with a minimum of extra glue in the other backends.
I wouldn't count on getting good hardware acceleration, given the past
record of XRender, gdk-pixbuf et all. To me it seems like either
hardware acceleration is designed in and present from the onset, or it
is nigh impossible to retrofit properly later.
> Question #4: When will this happen?
>
> - Not until GTK 2.8 is widely distributed.
>
> - Which is to say, probably for 2.2.
Yes, unfortunately even Fedora is keeping to a later schedule as of late,
so we cannot release something requiring 2.8 for a while.
Although as a recently converted Ubuntu user I should be able to cope.
;-)
--
Vasco Alexandre da Silva Costa
|
|