← Back to team overview

kicad-developers team mailing list archive

Re: wxDC & wxGraphicsContext Test

 

--- In kicad-devel@xxxxxxxxxxxxxxx, "Torsten Hüter" <torstenhtr@...> wrote:
> > With 200k lines is 20k for path, more or less like draw 10 heavy zones
> This is in my opinion a too high estimate; I don't think it's easy to usesuch big paths - because you have different line sizes, colors etc. - I'd rather use a path of 100 elements for the benchmark.

You are right, but we have to STRESS test the enviroment :)

> > But this could not preclude you some new ports of wx-widgets ?
> > Having a common Interface, this couldn't make easier port to a new library
> > if needed ?
> Well, at least at the moment it's a problem to support Windows this way -in my opinion the common interface is something that I call "Graphics Abstraction Layer" (GAL). This layer would be part of KiCad and various backends like OpenGL, Cairo, wxGC should be possible. Using Cairo is very simple (included in the examples).
> I've written a small example, how that could work (I'll post this later here).

We have already a GAL, wxGC does this work: is an astraction layer nothing more nothing less.
You can pick wxGraphicsContext do wxMyGraphicsContext and wrap which library you prefer.
Cairo on MSW is supported both on wx2.8 and wxTrunk and doesn't use GDI+ but only GDI with features not avaiable on wxDC.
The downside is that we have to compile the widgets with the right #defines.

> I've attached my benchmarks; however early stage - have to make some comments and code cleaning, more graphics primitives. Perhaps I'll write a small menu too. 
> For building you need GTK+2.0, Cairo, OpenGL. The wxGC version is roughlybased on your code.
> Cairo and wxGC have approx. the same drawing speed; OpenGL is much fasterthan both. 

wxGC is CAIRO on Linux, just remapped calls :)
We have to see if is possible enable OpenGL backend in cairo.

--
Marco






Follow ups

References