← Back to team overview

kicad-developers team mailing list archive

Re: Re: wxDC & wxGraphicsContext Test

 

--========GMX283221266436123658416 Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hi Marco,

> With 200k lines is 20k for path, more or less like draw 10 heavy zones
> following the jean-pierre hints.
> Is oblius that in the Kicad use the number of paths could be more, but
> remember that could be "appended" to existing ones.

This is in my opinion a too high estimate; I don't think it's easy to use such big paths - because you have different line sizes, colors etc. - I'd rather use a path of 100 elements for the benchmark.

> 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).

> Could be usefully on some platforms also specify which CARD and with which
> cairo backend and driver.

My setup:

Notebook Compaq CQ71-310SG
Intel Pentium T4300 2.1 GHz, 4 GB RAM, NVIDIA GeForce G103M 512 MB

Linux Mint 8 (http://www.linuxmint.com/) very nice distribution BTW, based on Ubuntu.

wxWidgets 2.8.1
Cairo 1.8.8

> > I had problems with boost::timer - the value seems to be incorrect (?) 
> 
> Incorrect, what make you think this, want to change it ?

The results are strange - the benchmark shows 0.12 seconds - but the screen drawing needs at least 1-2 seconds. Do you know if the rendering is done perhaps in another thread, outside of the OnPaint event? At least the time value seems to be too small - perhaps I've implemented / understood it wrong.

> I'm for a NO GO too now, but before a final choice better do a
> spectrum-wide test.

Yes, that's right, I'll try to improve the benchmarks, that we can make a objective decision. 

--

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 roughly based on your code.
Cairo and wxGC have approx. the same drawing speed; OpenGL is much faster than both. 

Bye ..
Torsten
-- 
NEU: Mit GMX DSL über 1000,- ¿ sparen!
http://portal.gmx.net/de/go/dsl02
 --========GMX283221266436123658416 Content-Type: application/zip; name="Benchmarks.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Benchmarks.zip"

[Attachment content not displayed.] --========GMX283221266436123658416-- 




Follow ups