-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Animations are not drawn #376
Comments
Can you perhaps post a screenshot of what you mean? I've reverted the change locally, but I couldn't see any differences. Though that might partially be due to me using Linux, which you've already hinted at. |
Yes, for the recording I've duplicated the drawer in the palette, otherwise it is not collapsible. When the animations.mp4 |
Ah, so that's what you mean. Thanks for the example! Hm, it doesn't look like those animations are played at all on Linux, regardless of whether the update method is called... |
No problem. On the other hand, I was not able to reproduce the flickering issues mentioned in #127 on Windows. Maybe it could be a quick solution, if the |
I also noticed that with the improvements of SWT we sometimes see improvements in Draw2d too. @Phillipus can you please comment here as well? |
|
You could try #377 to see if that works. |
That change fixes the palette animations. 👍 For the flow-example the graph layout uses it's own static animation constructs. When I add Update: I am using the animatable zoom from GMF in my application, which is not animated with the fix. |
As of now, I see these options:
Is it animated when reverting #127? |
Yes, it does, but having animations on Windows and flickering without animations on other platforms is somewhat undesirable.. I've opened a PR #378 which puts the When looking through the repository, the |
I thought about that but as the problem is related to animation I put it in the |
I guess, that's a little bit complex 😄 It got my attention when when I noticed that the animations on Windows were not drawn after #127 and when checking it on Linux, they didn't appear even with the revert. Therefore my guess was, that this wasn't supported even before. With the fix only in the |
Animations used to work on Linux and Mac up to about 2017 or 2018. Our app, Archi, has been around since 2010 so we used to have animations on all platforms. |
Actually, it only affects Windows so an OS check could be applied there. However, it would still break animation on Windows. |
Ok, that is strange. I just checked the master branch on a Linux system. There are no animations drawn, neither in the palette, nor in the flow-example graph layout. |
Do you mean with the |
With the current master branch, without any modifications, there are no animations. With I'm testing with OpenSuse in Hyper-V, it says X11. |
To be clear:
|
Could that be related to this issue: |
That's my bug report. There's no way of determining what caused animations to stop working on Mac and Linux. I think probably that changes to the OS were the cause, not SWT. |
Oh, I didn't see that 🙈 If I could, I would test it on OSX. But I can delegate it tomorrow if appreciated. |
To be clear, Animations do work on Linux and Mac with the |
From what I can tell, the issue is caused by the following contract of the UpdateManager no longer being satisfied:
This issue only shows up when the FigureCanvas is created using the However, because the call to And according to the documentation:
Though reverting #127 is not the solution as it only works on Windows, and because it paints too much (as shown by the artifacts of the originating bug). I tried out a few things and this is what I learned:
WithUpdate.webm
WithGraphics.webm
WithReadAndDispatch.webmBoth solutions 2) and 3) work, but 2) causes a lot of flickering. I'm not overly excited with 3), as there is no guarantee that the event that is executed is exactly the redraw event. But given that it worked in Archi for years, I think that' the best bet. |
When the FigureCanvas is created with SWT.DOUBLE_BUFFERED, animations are not painted correctly. This is because an instance of NativeGraphicsSource is used internally, which doesn't paint synchronously. Because the animation is done inside the UI thread, this paint operation is only processed after the animation is done. Resolves eclipse-gef#376
When the FigureCanvas is created with SWT.DOUBLE_BUFFERED, animations are not painted correctly. This is because an instance of NativeGraphicsSource is used internally, which doesn't paint synchronously. Because the animation is done inside the UI thread, this paint operation is only processed after the animation is done. Resolves eclipse-gef#376
Thank you for also deep diving into this. I can verify that the third solution seems to fix all issues I observed. |
When the FigureCanvas is created with SWT.DOUBLE_BUFFERED, animations are not painted correctly. This is because an instance of NativeGraphicsSource is used internally, which doesn't paint synchronously. Because the animation is done inside the UI thread, this paint operation is only processed after the animation is done. Resolves eclipse-gef#376
When the FigureCanvas is created with SWT.DOUBLE_BUFFERED, animations are not painted correctly. This is because an instance of NativeGraphicsSource is used internally, which doesn't paint synchronously. Because the animation is done inside the UI thread, this paint operation is only processed after the animation is done. Resolves eclipse-gef#376
This one has been going on for several months now... @azoitl Should we include one of the fixes before the M1 and finally get this sorted out? |
@ptziegler yes we should. I'm still not perfectly sure which one. But I have a slight tendency to your solution as it is the more general solution. Am I right? |
It's the only one that doesn't cause test failures 😅 |
But as the problem is only to do with animation changing |
Oh I was to fast and already merged. Should I revert, or should we give it a try? Early in the development cycle I tend to keep it. |
I still believe that the issue stems from repaint operation triggered by This issue is very noticeable with the animations, but it would generally happen whenever paint operations are done consecutively, as only the "last" repaint is processed. Regarding the other proposals: I'm still not sure what's causing the The fact that we both had to guard against this case in the Animation class is an indicator for this. |
Urgh... the test failures seem to be a result of this. Because the animations are drawn again, adding e.g. an edit part takes longer. The result is that the animation isn't finished by the time SWTBot checks the new state of the editor. We probably should've done a rebase before merging. Given that M1 is due today, I would suggest rolling the commit back until this is sorted out. |
Reopened because ee7f7ee was reverted. |
Then I'll start M1 now and we see how this can be fixed later. |
Hello again, linux-readAndDispatch.mp4On Linux, there is rarely a dancing palette, but performance while animating afterwards decreases windows-readAndDispatch.mp4On Windows it's obvious I assume that this issue is becoming more complex, since not all parts use the Animation class for animating their contents (e.g. the |
To avoid any misunderstandings, which of the three proposed fixes are you using? Given that they are applied to different locations, each one may introduce their own set of unwanted side-effects. |
I am using the third variant with |
This issue is stale because it has been open for 90 days with no activity. |
When the FigureCanvas is created with SWT.DOUBLE_BUFFERED, animations are not painted correctly. This is because an instance of NativeGraphicsSource is used internally, which doesn't paint synchronously. Because the animation is done inside the UI thread, this paint operation is only processed after the animation is done. Resolves eclipse-gef#376
Hello,
after looking into the flow example again, I've noticed that the animations for the graph layout are not drawn anymore. I was able to track it down to the changes introduced in #127. This also affects the animations for palette drawers and animated zoom.
Currently, for me this is reproducible on Windows. On Linux I am not sure whether this was ever supported.
The text was updated successfully, but these errors were encountered: