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

osx: fix high cpu usage when obscured #13016

Merged
merged 1 commit into from Nov 7, 2017
Merged

Conversation

FernetMenta
Copy link
Contributor

see title

@FernetMenta FernetMenta added Type: Fix non-breaking change which fixes an issue Platform: macOS labels Nov 6, 2017
@Memphiz
Copy link
Member

Memphiz commented Nov 6, 2017

Oha ... didn't expect this sort of workaround from you tbh - but am totally fine with is. But it could need a comment on why we sleep there ...

@FernetMenta
Copy link
Contributor Author

FernetMenta commented Nov 6, 2017

this is no workaround at all. the architecture delegates throttling of the render/main loop to windowing. if, for what reason ever, swapBuffers does not block, windowing has to take action.

@Rechi
Copy link
Member

Rechi commented Nov 6, 2017

Is this worth a backport (applies cleanly) or is it to risky?

@FernetMenta
Copy link
Contributor Author

I don't think it is risky.

@FernetMenta
Copy link
Contributor Author

comment added

@Memphiz
Copy link
Member

Memphiz commented Nov 6, 2017

Thx - sorry somehow i was confused because the last time we had this cpu usage problem it was in the dirty regions area of things. Guess this throttle not working is something in the osx gl implementation then (were swapbuffers is a nop or something when kodi is offscreen maybe).

@FernetMenta
Copy link
Contributor Author

@Memphiz the method IsObscured was actually implemented for this purpose: de39686

It got lost because the old code violated a basic OO principle: information hiding. OSX promoted its private function to CApplication.

@Memphiz
Copy link
Member

Memphiz commented Nov 6, 2017

Yes i know that method very well - i had to add exceptions for all those full screen alpha translucent apps that are meant to decrease brightness (which resulted in frame limiter kicking in). So in case people are reporting stuttering ui rendering - we need to have those apps in mind aswell... ;)

@Rechi
Copy link
Member

Rechi commented Nov 6, 2017

jenkins build this please

@Rechi
Copy link
Member

Rechi commented Nov 7, 2017

WIN-UWP-ARM failure is unrelated

@FernetMenta
Copy link
Contributor Author

build error unrelated

@FernetMenta FernetMenta merged commit 957c10a into xbmc:master Nov 7, 2017
@FernetMenta FernetMenta deleted the osxfix branch November 7, 2017 11:51
@MartijnKaijser
Copy link
Member

@Memphiz you want this backported or risk too high?

@Memphiz
Copy link
Member

Memphiz commented Nov 11, 2017

No risk immo @FernetMenta what do you think?

@FernetMenta
Copy link
Contributor Author

I think risk is low. Note that I did not test it on v17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport: Done Platform: macOS Type: Fix non-breaking change which fixes an issue v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants