Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@enen92
Copy link
Member

@enen92 enen92 commented Apr 20, 2024

Description

To render while resizing Kodi would need to render in NSView drawrect, in the main thread. Since we currently render in the application thread there's no other way to solve this without simply avoid refreshing while doing live resizes. Resizing the window steals the gl context and we could simply be performing render operations. Also, locking or similar approaches have detrimental effect on the render performance because the context belongs to the view and we'd have to execute operations on the main thread.
So for now, let's just block refreshes while doing live resizes, the view gets refreshed at the end of the operation.
This was the approach the old sdl implementation used to follow.

For the future we should consider splitting the app rendering to an application component and later to another thread (so that platforms could decide which thread to use for rendering)

Motivation and context

Fixes #24954

How has this been tested?

Runtime tested on Macos, doing live resize

What is the effect on users?

App should not crash anymore on live resize. Solution isn't perfect (the previous rendered texture keeps on screen - scaled - until you stop resizing) but it's the possible solution

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • Student submission (PR was done for educational purposes and will be treated as such)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@enen92
Copy link
Member Author

enen92 commented Apr 21, 2024

Jenkins build and merge

@jenkins4kodi jenkins4kodi merged commit c48c9e6 into xbmc:master Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kodi crashes on window resize

3 participants