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

Added OpenGL support on Android #5331

Merged
merged 1 commit into from
Jan 22, 2021
Merged

Conversation

jp2masa
Copy link
Contributor

@jp2masa jp2masa commented Jan 22, 2021

What does the pull request do?

  • Added OpenGL support on Android.

What is the current behavior?

There's no hardware acceleration on Android.

What is the updated/expected behavior with this PR?

OpenGL is enabled on Android by default. Control Catalog is no longer too slow on Android, but still a bit slow.

Checklist

@kekekeks
Copy link
Member

I guess the only thing left is to make it work from a background thread so DeferredRenderer could do its thing

@jp2masa
Copy link
Contributor Author

jp2masa commented Jan 22, 2021

I believe that as well, unfortunately I don't know exactly how it works. If you could point me in the right direction I would be thankful, but don't be bothered to explain if it's too complex.

@kekekeks
Copy link
Member

kekekeks commented Jan 22, 2021

It's actually pretty simple

  1. implement IRenderTimer that ticks on the background thread and is synchronized with the display refresh rate (or use SleepLoopRenderTimer for now), pay attention to not trigger ticks when app is in background
  2. change the renderer to DeferredRenderer and set RenderOnlyOnRenderThread to true
  3. add the relevant locks

That's a story for a different PR though

@kekekeks kekekeks merged commit bef6336 into AvaloniaUI:master Jan 22, 2021
@jp2masa jp2masa deleted the android branch January 22, 2021 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants