-
Notifications
You must be signed in to change notification settings - Fork 47
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#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#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#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: