Commit 82044381 authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

HDR/macOS: Use default HDR metadata

Specify a 0.005-1,000 nit luminance by default. This is a temporary
measure in two ways:
- We should plumb this through video and the compositor, and thereby
  get the correct values.
- The default tonemapping affects the SDR range, which is undesirable.
  We should roll our own tonemapping that doesn't have this property.

This will make HDR look less washed out on barely-HDR-capable monitors,
such as the built-in Macbook Pro screens.

Bug: 1101041
Change-Id: I4db344d35f5259dbeb4191e4901e9798882a06d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2300979Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788803}
parent 6a22fe93
......@@ -72,6 +72,9 @@ API_AVAILABLE(macos(10.15))
if (self = [super init]) {
base::scoped_nsprotocol<id<MTLDevice>> device(metal::CreateDefaultDevice());
[self setWantsExtendedDynamicRangeContent:YES];
[self setEDRMetadata:[CAEDRMetadata HDR10MetadataWithMinLuminance:0.005
maxLuminance:1000
opticalOutputScale:100]];
[self setDevice:device];
[self setOpaque:NO];
[self setPresentsWithTransaction:YES];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment