Skip to content
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

[Avalonia.Android] GPU Hardware Acceleration doesn't work. #17042

Open
J0nathan550 opened this issue Sep 17, 2024 · 3 comments
Open

[Avalonia.Android] GPU Hardware Acceleration doesn't work. #17042

J0nathan550 opened this issue Sep 17, 2024 · 3 comments
Labels

Comments

@J0nathan550
Copy link

Describe the bug

Hello, I was developing an Android Application using Avalonia but noticed that scrolling or anything else in my android app is very laggy.

I started to debug, and find out that Avalonia doesn't use GPU rendering in Android and lags badly.

Below are videos showing (with red and green) that gpu (hardware acceleration) is getting called and optimizes phone to 60 fps.
In video there is also demo where those Hardware Acceleration calls are not used, and it's likely that the rendering is done only on CPU.
Also there are comparing between Android Studio app (plain application) and Avalonia application.

367693828-93d9c895-d022-423e-a510-cbacb5b21551.mp4
367693814-450efbc0-4ccf-4571-be96-ae8d827695e4.mp4

To Reproduce

Setup a listbox (recycler view) with elements you like and scroll, you will see how bad lags it is.

Expected behavior

Not to lag, and work on GPU.

Avalonia version

11.1.3

OS

Android

Additional context

No response

@J0nathan550 J0nathan550 changed the title [Avalonia.Android] GPU Hardware Acceleration doesn't work. #17028 [Avalonia.Android] GPU Hardware Acceleration doesn't work. Sep 17, 2024
@emmauss
Copy link
Contributor

emmauss commented Sep 18, 2024

Which of those is the avalonia app, and are you sure it's running the latest stable?

@emmauss
Copy link
Contributor

emmauss commented Sep 18, 2024

Also, the dev options you enabled to show the gpu behavior is called View Updates. It only shows when a view is drawn. It will always show 1 update when the view is created on real GPU accelerated views, like games and our renderer. Because we render directly to the gpu surface provided by the OS. So yeah, what you did isn't a good metric for gpu behavior.

@J0nathan550
Copy link
Author

Which of those is the avalonia app, and are you sure it's running the latest stable?

Black "SoundScapes" app. Where you can search a music.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants