← Back to team overview

kicad-developers team mailing list archive

Re: eeschema WX_OVERLAY/OSX rework to fix redraw artifacts

 

Hmm.
Does Windows use the USE_WX_GRAPHICS_CONTEXT or is it just the same as Linux?

I guess its best to postpone merging that one then. 
The only quick hack I can imagine would be to #ifdef all the changes in drawing mode.
These are quite some spots, so this would really get ugly.

Maybe I have to reactivate my old Windows/Linux box to be able to play around a bit and to figure out what’s going on.
What I currently don’t understand is why it seems to work better in the current (but, in my opinion inconsistent) state where things are drawn in some spots with g_XorMode and in other spots with DEFAULT (=COPY) mode.
And, why it gets worse when making things more consistent (the spots I changed can’t be that wrong because otherwise things wouldn’t work on OSX, too).

But, maybe I just missed some additional non-OSX relevant spots that now might have to be changed also to clean everything up. There are so many different spots where g_XorMode, GR_XOR, and all the other drawing modes are used differently, so this is really hard to understand.

And, thinking of the bug report Nick mentioned (Bug #1381864) I almost think that even in current state something isn’t totally right (on non-OSX platforms), because the artifacts of that report look quite similar to what my changes seem to have brought up for you...


Regards,
Bernhard


On 16.11.2014, at 17:27, Wayne Stambaugh <stambaughw@xxxxxxxxxxx> wrote:

> On 11/16/2014 10:10 AM, Bernhard Stegmaier wrote:
>> Hi Wayne,
>> 
>> is Windows using WX_OVERLAY?
>> I didn’t think so… but I never looked for that.
> 
> No.
> 
>> 
>> The extra redraw events are only generated in case of WX_OVERLAY, which I thought is only used for OSX.
>> The only part of the changes that are not inside some WX_OVERLAY #ifdef's are the changes from XOR-mode to DEFAULT mode in drawing some things (rev. 5203 in my branch).
>> This, however, should have no side-effect otherwise I guess it wouldn’t have worked before?
>> 
>> Your screenshot very much looks like the one Nick mentioned recently:
>>  https://launchpadlibrarian.net/187456875/kicadBug.png
>> 
>> Are you sure that you see these artifacts only with my changes?
> 
> The comparison is between product branch r5288 and your branch r5206.
> 
>> 
>> 
>> Regards,
>> Bernhard
>> 
>> On 16.11.2014, at 15:08, Wayne Stambaugh <stambaughw@xxxxxxxxxxx> wrote:
>> 
>>> Hey Bernhard,
>>> 
>>> I just finished building and testing your changes.  Something has
>>> definitely changed in the rendering.  I get a lot of redraw artifacts
>>> (see screen shots) with your changes that I do not get with the current
>>> product branch.  It's possible that some extra refresh events are
>>> occurring that are causing the problem.  I still have to test this on
>>> Linux as well but I am reluctant to merge your changes until we can
>>> resolve the windows rendering issue.
>>> 
>>> Wayne
>>> 
>>> On 11/16/2014 7:43 AM, Bernhard Stegmaier wrote:
>>>> Hi Wayne,
>>>> 
>>>> yes, it was behind that changes.
>>>> Updated to 5288.
>>>> 
>>>> 
>>>> Thanks,
>>>> Bernhard
>>>> 
>>>>> On 16.11.2014, at 02:10, Wayne Stambaugh <stambaughw@xxxxxxxxxxx> wrote:
>>>>> 
>>>>> On 11/15/2014 11:13 AM, Bernhard Stegmaier wrote:
>>>>>> Hi all,
>>>>>> 
>>>>>> eeschema still has some not so bad but nevertheless annoying redraw bugs on OS X (using WX_OVERLAY), e.g., doing a rotate during a move.
>>>>>> 
>>>>>> In the branch
>>>>>> lp:~stegmaier/kicad/kicad-eeredraw
>>>>>> https://code.launchpad.net/~stegmaier/kicad/kicad-eeredraw
>>>>>> I reworked current WX_OVERLAY handling to fix this (this branch does not contain any other changes).
>>>>>> 
>>>>>> The general idea of the rework is that the drawing code wants to draw some item if the drawing mode is DEFAULT. If the drawing code wants to remove an item it uses XOR mode. This is nothing new, it is done that way at many places but not consistently in all spots.
>>>>>> For WX_OVERLAY if some item is to be removed a complete redraw is triggered (this might not be the most smart approach, but the easiest one and I did not see any real big performance impact).
>>>>>> 
>>>>>> Rework consists of 3 parts:
>>>>>> (1) Remove different WX_OVERLAY specific fixes/workaround being not consistently used (rev. 5202).
>>>>>> (2) Only when WX_OVERLAY is being used: push down the remove/repaint check to all draw methods (rev. 5201).
>>>>>> (3) Change drawing mode consistently to use DEFAULT for drawing and XOR for removing an item (rev. 5203).
>>>>>> 
>>>>>> I have tested the changes quite some while on OS X and did not notice any redraw artifacts any longer.
>>>>>> 
>>>>>> Since part (3) also affects other platforms, changes have to be tested not only on OS X. 
>>>>>> However, there should be no change in behavior on platform not using WX_OVERLAY (in theory).
>>>>>> 
>>>>>> It would be great if this could get merged to main branch.
>>>>>> 
>>>>>> 
>>>>>> Regards,
>>>>>> Bernhard
>>>>>> 
>>>>> 
>>>>> Bernhard,
>>>>> 
>>>>> Please sync this branch with the latest product branch so I can build
>>>>> and test it on windows.  I'm getting the Boost 1.57 avhttp build error
>>>>> so you must be a few revision behind.
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Wayne
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>> More help   : https://help.launchpad.net/ListHelp
>>>> 
>>>> 
>>> 
>>> <osx-render-fix-branch.png><product-branch.png>_______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>> 
>> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp



Follow ups

References