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

Better workaround #1

Open
frankschlegel opened this issue Feb 2, 2022 · 0 comments
Open

Better workaround #1

frankschlegel opened this issue Feb 2, 2022 · 0 comments

Comments

@frankschlegel
Copy link

Hey,

Thank you so much for sharing this demo!

I was playing a lot with this and found that there is an easier way to enable EDR on the MTKView:
The wantsExtendedDynamicRangeContent property is actually there on iOS as well, just not public. So you can just use KVO to enable EDR rendering:

[self.layer setValue:[NSNumber numberWithBool:YES] forKey:@"wantsExtendedDynamicRangeContent"];

No need to add a hidden AVPlayerLayer anymore. 🙂

Similarly, you can also query the EDR properties of the screen:

[[UIScreen mainScreen] valueForKey:@"extendedDynamicRangeCurrentHeadroom"];
[[UIScreen mainScreen] valueForKey:@"extendedDynamicRangePotentialHeadroom"];
[[UIScreen mainScreen] valueForKey:@"extendedDynamicRangeReferenceHeadroom"];

I hope that helps. Thanks again!

@ToddLa ToddLa mentioned this issue Apr 21, 2022
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

1 participant