← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] wxWidgets 2.8 under Graphics Abstraction Layer Lib (GAL)

 

On 12/15/2010 01:15 AM, jean-pierre charras wrote:
> Le 14/12/2010 18:59, Dick Hollenbeck a écrit :
>>> Thanks for the discussion on gerbview.
>>>
>>> 1920 x 1200 = 2304000 pixels
>>> ---------------------------------  = 1.92
>>>
>>> 1200 x 1000  = 1200000 pixel
>>>
>>>
>>> Yes, it seems you are correct, the area difference is no explanation for this large
>>> difference in blit "mask with AND" mode.
>>
>> Well on second thought, it is not O(screen area).
>>
>> Screen area could be the entire reason.
>>
>> I will try it with a reduced resolution setting soon.
>>
>> Dick
>>
> I forgot:
>
> If you are compiling with option USE_WX_ZOOM = ON, the patch has a bug in BOARD::Draw.
> line
>          aPanel->DrawBackGround( &screenDC );
> must be
>          aPanel->DoPrepareDC(screenDC);
>          aPanel->DrawBackGround( &screenDC );
>
> Otherwise, if the grid display option is ON, the grid is always drawn, regardless the grid size in pixels,
> because in the current device context, the user scale is set to 1.0, and testing to see if the grid size in pixel is more than 10 
> pixels fails.
>
> For zoom values of 16 and more, the grid drawing routine is therefore very long and can easily explain 20 seconds to redraw the 
> screen.
> Roughly, the grid routine try to draw the grid on a screen size of zoom * screen_size_x * zoom * screen_size_y.
> If the grid size is low and zoom value hight, it takes a while.
>
> (Can be avoid if you switch the grid display OFF)

Jean-Pierre,

I have 15 *.pho files associated with the board I had sent you for debugging the
zones.  Fifteen *.pho layers.  That screen redraws in 1.8 seconds using the "bitmask
with COPY" mode.
On a full screen. 

*The twenty seconds was a bad report, sorry.*

I think I loaded the gerbers on the command line with "ks*.pho" and ended up with 30
gerbers, since there were two root filename sets, say ks1*.pho and ks2*.pho.  My bad. 
But it was never 20 seconds, just feld like it, and mostly because the loading of the
gerbers redraws the screen after each individual layer.

In the OR mode, it is faster. 

If I scrink the screen, it gets faster, goes down to 0.7 seconds or so, approximately
proportional to screen area.  The grid had not much effect that I could tell.

I think the 1.8 seconds is tolerable for now.  And the faster OR mode even more so.

I really like the look of the "bitmask with COPY" mode. 

It would be nice to have both modes. 

Lastly until I buffered using screenDC, I had been getting screen flashing using the
"bitmap with COPY" mode.  So I think we need to keep that, or something like it.


GetBoard()->Draw( DrawPanel, DC,
                GR_COPY,                  // this needs to be GR_COPY or GR_OR, set
from a toggle button.
                wxPoint( 0, 0 ) );


That argument GR_COPY, if it could be button toggled to GR_OR, with the other TODO
items I mentioned when I emailed the patch, would probably make for an excellent step
forward for this tool.

Thanks,

Dick




Follow ups

References