Replies: 4 comments 7 replies
-
A 4K screen is huge task for a low end device. The number of pixels is square, so double screen size means 4 times more pixels to calculate. |
Beta Was this translation helpful? Give feedback.
-
Avalonia attempts to only draw the changed area of the screen. However it only tracks ONE area per frame. When you have two changed elements at the opposite corners of the screen it will trigger a full repaint. We used to have accurate dirty rect tracking, but it involved its own problem with repainting complex backgrounds shared by multiple elements. Verify that you are using GPU-powered rendering, it should help with the frame rate. |
Beta Was this translation helpful? Give feedback.
-
Interesting, I was under the impression that the rendering is limited by the render loop timer to 60 fps in all cases. So Angle has a higher tick rate, or a way of rendering something outside the render loop? |
Beta Was this translation helpful? Give feedback.
-
To save any future person's time who stumbles upon this discussion, I struggled with a similar issue for many hours and ended up asking a question here and was told how to re-enable the multi-box clipping. There is an option when you build the app: public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.With(new CompositionOptions()
{
UseRegionDirtyRectClipping = true
})
.UseSkia() |
Beta Was this translation helpful? Give feedback.
-
I am writing an Avalonia app that needs to render bitmap-based animations and custom draw operations at a faster frame rate, typically 30-60 FPS. I have noticed that the final frame rates delivered don't necessarily correlate with just the number of running animations, but also with the amount of space around the elements. I have attached a sample to demonstrate this (which only includes a bitmap based widget). On my reasonably fast machine at standard HD resolution, the frame rate is what I expect, but at 4K and full screen, the frame rate drops, but can be restored by resizing the window to eliminate the space around the animations. The problem gets significantly worse on lower power hardware (e.g. RPi 4) where the frame rate varies from expected to very slow as the window is resized larger.
I cannot easily explain why this is the case with my limited knowledge of Avalonia, so I am presenting the problem here in the hope that someone could throw light on this, or perhaps tell me raise an issue.
AvaloniaTestApp.zip
Beta Was this translation helpful? Give feedback.
All reactions