chromium/ui/gfx/mojom/hdr_metadata.mojom

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module gfx.mojom;

import "skia/public/mojom/skcolorspace_primaries.mojom";

// Mojo equivalent of gfx::HdrMetadataCta861_3. No validation is done on any of
// these values during deserialization.
struct HdrMetadataCta861_3 {
  uint32 max_content_light_level;
  uint32 max_frame_average_light_level;
};

// Mojo equivalent of gfx::HdrMetadataSmpteSt2086. No validation is done on any
// of these values during deserialization.
struct HdrMetadataSmpteSt2086 {
  skia.mojom.SkColorSpacePrimaries primaries;
  float luminance_max;
  float luminance_min;
};

// Mojo equivalent of gfx::HdrMetadataNdwl. No validation is done on
// any of these values during deserialization.
struct HdrMetadataNdwl {
  float nits;
};

// Mojo equivalent of gfx::HdrMetadataExtendedRange. No validation is done on
// any of these values during deserialization.
struct HdrMetadataExtendedRange {
  float current_headroom;
  float desired_headroom;
};

// Mojo equivalent of gfx::HDRMetadata.
struct HDRMetadata {
  HdrMetadataSmpteSt2086? smpte_st_2086;
  HdrMetadataCta861_3? cta_861_3;
  HdrMetadataNdwl? ndwl;
  HdrMetadataExtendedRange? extended_range;
};