← Back to team overview

kicad-developers team mailing list archive

Re: Re: redraw on erase track segment

 

Dick Hollenbeck wrote:
PS:
I tested the new code about delete track segment on a very large board (8 layers, 4000 pads 1350 vias...)
It is reasonably fast on my PC ( a low cost computer which is 4 years old).
An enhancement could be to redraw only the region modified in order to reduce the flicker (all kicad draw functions already use a clip box).




I now understand what Kicad is capable of by looking at

void WinEDA_DrawPanel::OnPaint( wxPaintEvent& event )

But to be honest, that code looks wrong:

1) We don't really pay attention to the dirty rect other than setting the clipping area. (There is no subset of the draw list decision making.)

2) We are actually going through the entire Kicad drawing code for as many times as there are dirty regions. Well ok, I would assume the number of dirty regions is probably normally exactly one most of the time. (But this may soon change if we implement the entire track delete with a number of dirty rectangles.)

I wonder if it would be better to create a union of all the dirty rectangles, use that as the clipping region, then call our ReDraw() just once.

In any case this may be a discussion for another day if we want to speed things up a little.

---------------------------

I will try the dirty region technique on my patch from yesterday. I just have to compute the bounding box of a single track.


Dick








Follow ups

References