Re: GtkCanvas requirements?

Cody Russell wrote:
> I'd like the canvas system to be generalized enough that we can have
> multiple implementations of it, in the same way that GDK allows us to
> port to Win32 or MacOSX.  In particular, I think we could have an
> implementation that is much like what most of the canvases are doing
> today where everything is software rendered..

Well, there are actually two generations of GTK+ related canvases out
there. The GnomeCanvas family (with FooCanvas), which indeed does all
the rendering in software. And then there's the cairo-based generation
(libccc, goocanvas, hippocanvas, …). The cairo-based generation already
isn't forced to being rendered in software.

> but I also think we could
> do an OpenGL backend, an OpenGL|ES backend, and possibly a Direct3d
> backend if there were a reason to do one.

We already have this on the cairo level. You can render by using OpenGL
using the Glitz backend. You can render hw-accelerated using the Xlib
backend (which uses XRender). On windows, it uses a GDI backend. IMHO
one of the biggest points of a canvas as a next gen widget system is
that lots of window-system-dependent stuff isn't needed in canvas items
anymore (in contrast to the GnomeCanvasItem::map stuff).

> I've been putting some thought into the idea of a GPU-based GTK, and
> when Havoc first mentioned going the route of having a canvas-based
> widget system I became instantly interested in that because I thought it
> was the perfect opportunity to go the GPU route.

Well, isn't the "right" way to go the cairo path and make the
communication of cairo and the GPU faster (that's "improve Xrender, the
drivers etc.")? As this needs to be improved for a "GPU based GTK"
anyway you won't get any advantage by adding this new level of "platform
independence" to GTK (which is already available in cairo).

Unfortunately I'm not completely into the current state of
hardware-accelerated cairo, but that information should be easy to collect.


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