← Back to team overview

kicad-developers team mailing list archive

Re: Re: wxDC & wxGraphicsContext Test

 

emmedics4 wrote:
>>> Good, but no application would use only one Path (means 1 thichness and color), using 10 changes something ?
>> Yes. If you look at source code for wxGraphicsContext, you will see
>> that wxGCDC::DrawLine() ends up creating and destroying a
>> wxGraphicsPath() for each line drawn. This is why your initial test saw
>> a large improvement on OSX. It was only using 10 paths when drawing
>> with wxGraphicsContext compared to 200,000 paths (indirectly) when
>> drawing with wxDC. See wxWidget's source file common/graphcmn.cpp. I
>> believe that this is what Dick was talking about when using a proper
>> wxGraphicsContext implementation instead of wxGCDC. There must be some
>> significant overhead when constantly calling the graphics context for
>> each line.
> I mean if on platform you have tested there is a difference of performance with 1 versus 10 Path ? 
> I've used that number because a number near at the need of pcbnew.

Sorry about the confusion. I did test 1 vs 10 paths and only saw ~0.05s
difference.

>>>> On gtk/cairo and msw/gdi+ the story is
>>>> different. Although there is an order of magnitude performance
>>>> decrease, gtk/cairo is probably usable. However, the the msw/gdi+
>>>> situation is bleak. I cannot see how msw/gdi+ could ever be made usable
>>>> for Kicad (or anything else for that matter). The msw/cairo combination
>>>> still needs to be investigated. I'll try to test this over the next
>>>> week or two when I get some free time. I may also try to modify the
>>>> example to use SFML if it isn't too much of a hassle to see if it lives
>>>> up to it's name.
>>> Which CAIRO backend are you using and with which driver on linux ?
>> I'm using the AMD64 version of Debian testing (sqeeze) with the NVidia
>> proprietary drivers and cairo version 1.8.8.
> Be sure to being using glitz and have OpenGL enabled on the driver.

I know OpenGL is enabled. I'm not sure about glitz. I'll check and
rerun the test as necessary.

>>>> It's looking like Manveru was correct about GDI+ performance. It is
>>>> also looking like I may have wasted my time moving the coordinate
>>>> transforms to wxDC if we can't use wxGraphicsContext due to performance.
>>> First test are for NO GO for me too, but better doing more deep tests before thrash all.
>> I don't know about that. The gtk/cairo difference of 0.04s to 0.5s can
>> probably be improved enough with some clever programming. I seriously
>> doubt that you are going to overcome the 0.124s to 17.985s difference on
>> msw/gdi+ with careful programming unless this test is the completely
>> wrong approach to using wxGraphicsContext.
> 
> I was suggesting from the beginning the escape of msw/cairo for this reason, moreover
> GDI+ was dumped in the latest windows releases as the standard is now Direct2D: (http://msdn.microsoft.com/en-us/library/dd370990(VS.85).aspx) HW accelerated, so users are cut in two slices with a cut between XP and Vista.

It may be a while before I get to test msw/cairo. I'm still using
wxWidgets 2.8.10. I believe the msw/cairo patch was applied to the 2.9
branch. I don't know if the patch will apply cleanly to 2.8.10 and I
really don't have time to play around with wxWidgets 2.9.

Wayne

> 
> --
> Marco

 




Follow ups

References