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

Improve rendering performance for multiple display usecase #259

Open
moetayuko opened this issue Oct 20, 2024 · 3 comments
Open

Improve rendering performance for multiple display usecase #259

moetayuko opened this issue Oct 20, 2024 · 3 comments
Assignees

Comments

@moetayuko
Copy link
Contributor

I'm unfamiliar with OpenGL, so please let me know if I'm wrong.

If I read the code correctly, each window has its own FBO, and the scenes and videos are rendered separately. This is fine for single-screen but inefficient for multi-screen, and I observe increased GPU usage in the latter case.

From what I understand, if the same content is used for multiple screens, it only needs to be rendered once, and then copied to the rest screens, maybe it can be done by glBlitFramebuffer?

@Almamu
Copy link
Owner

Almamu commented Nov 8, 2024

Backgrounds that have interaction (mouse parallax or web backgrounds for example) won't always look the same on all screens as they react to user's movements, so in order to support that, each screen has it's own wallpaper rendered separately. We could improve the situation in a couple different ways tho:

  • Add a command-line switch to clone the same background to all screens and override this behavior
  • Detect what backgrounds that use parallax or web and only render those separately

It's been some time since I last tried this on Windows, so I'm not 100% sure on how it handles these situations.

@moetayuko
Copy link
Contributor Author

I'm wondering if the following policy makes sense:

  • web backgrounds are rendered with cef, and can continue to render separately
  • video backgrounds are rendered with mpv which does not accept interactions, so they should be rendered once and copied to each display
  • for scene backgrounds, a cmd line toggle can be added to let the user trade-off between accurate interaction and efficiency. Detecting the presence of interaction can serve as a complement to the toggle.

@Almamu
Copy link
Owner

Almamu commented Nov 25, 2024

That sounds like a reasonable approach, yeah. There's a special case that might require some extra handling too. As it stands right now, one instance of linux-wallpaperengine can run different backgrounds on each screen, so that has to be taken into account too (I guess applying the same logic for screens sharing the same background id should be enough).

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

No branches or pull requests

2 participants