// skia/public/mojom/hdr_metadata.mojom-blink.h is auto generated by mojom_bindings_generator.py, do not edit

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

#ifndef SKIA_PUBLIC_MOJOM_HDR_METADATA_MOJOM_BLINK_H_
#define SKIA_PUBLIC_MOJOM_HDR_METADATA_MOJOM_BLINK_H_

#include <stdint.h>

#include <limits>
#include <optional>
#include <type_traits>
#include <utility>
#include "mojo/public/cpp/bindings/clone_traits.h"
#include "mojo/public/cpp/bindings/equals_traits.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "mojo/public/cpp/bindings/union_traits.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"

#include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"

#include "skia/public/mojom/hdr_metadata.mojom-features.h"  // IWYU pragma: export
#include "skia/public/mojom/hdr_metadata.mojom-shared.h"  // IWYU pragma: export
#include "skia/public/mojom/hdr_metadata.mojom-blink-forward.h"  // IWYU pragma: export
#include "skia/public/mojom/skcolorspace_primaries.mojom-blink.h"

#include "mojo/public/cpp/bindings/lib/wtf_clone_equals_util.h"
#include "mojo/public/cpp/bindings/lib/wtf_hash_util.h"
#include "third_party/blink/renderer/platform/wtf/hash_functions.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"




#include "skia/public/mojom/hdr_metadata_mojom_traits.h"
#if !BLINK_MOJO_IMPL && !INSIDE_BLINK
#error "File must only be imported inside blink"
#endif




namespace skia::mojom::blink {





class  SkHdrContentLightLevelInformation {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SkHdrContentLightLevelInformation, T>::value>;
  using DataView = SkHdrContentLightLevelInformationDataView;
  using Data_ = internal::SkHdrContentLightLevelInformation_Data;

  template <typename... Args>
  static SkHdrContentLightLevelInformationPtr New(Args&&... args) {
    return SkHdrContentLightLevelInformationPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SkHdrContentLightLevelInformationPtr From(const U& u) {
    return mojo::TypeConverter<SkHdrContentLightLevelInformationPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SkHdrContentLightLevelInformation>::Convert(*this);
  }


  SkHdrContentLightLevelInformation();

  SkHdrContentLightLevelInformation(
      float max_cll,
      float max_fall);


  ~SkHdrContentLightLevelInformation();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SkHdrContentLightLevelInformationPtr>
  SkHdrContentLightLevelInformationPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SkHdrContentLightLevelInformation::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SkHdrContentLightLevelInformation::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SkHdrContentLightLevelInformation::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrContentLightLevelInformation::DataView, ::blink::Vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrContentLightLevelInformation::DataView, ::blink::Vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SkHdrContentLightLevelInformation::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SkHdrContentLightLevelInformation_UnserializedMessageContext<
            UserType, SkHdrContentLightLevelInformation::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SkHdrContentLightLevelInformation::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SkHdrContentLightLevelInformation::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SkHdrContentLightLevelInformation_UnserializedMessageContext<
            UserType, SkHdrContentLightLevelInformation::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SkHdrContentLightLevelInformation::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  float max_cll;
  
  float max_fall;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, SkHdrContentLightLevelInformation::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, SkHdrContentLightLevelInformation::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, SkHdrContentLightLevelInformation::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, SkHdrContentLightLevelInformation::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}






class  SkHdrAgtmGainCurveControlPoint {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SkHdrAgtmGainCurveControlPoint, T>::value>;
  using DataView = SkHdrAgtmGainCurveControlPointDataView;
  using Data_ = internal::SkHdrAgtmGainCurveControlPoint_Data;

  template <typename... Args>
  static SkHdrAgtmGainCurveControlPointPtr New(Args&&... args) {
    return SkHdrAgtmGainCurveControlPointPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SkHdrAgtmGainCurveControlPointPtr From(const U& u) {
    return mojo::TypeConverter<SkHdrAgtmGainCurveControlPointPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SkHdrAgtmGainCurveControlPoint>::Convert(*this);
  }


  SkHdrAgtmGainCurveControlPoint();

  SkHdrAgtmGainCurveControlPoint(
      float x,
      float y,
      float m);


  ~SkHdrAgtmGainCurveControlPoint();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SkHdrAgtmGainCurveControlPointPtr>
  SkHdrAgtmGainCurveControlPointPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SkHdrAgtmGainCurveControlPoint::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SkHdrAgtmGainCurveControlPoint::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SkHdrAgtmGainCurveControlPoint::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAgtmGainCurveControlPoint::DataView, ::blink::Vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAgtmGainCurveControlPoint::DataView, ::blink::Vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SkHdrAgtmGainCurveControlPoint::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SkHdrAgtmGainCurveControlPoint_UnserializedMessageContext<
            UserType, SkHdrAgtmGainCurveControlPoint::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SkHdrAgtmGainCurveControlPoint::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SkHdrAgtmGainCurveControlPoint::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SkHdrAgtmGainCurveControlPoint_UnserializedMessageContext<
            UserType, SkHdrAgtmGainCurveControlPoint::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SkHdrAgtmGainCurveControlPoint::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  float x;
  
  float y;
  
  float m;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, SkHdrAgtmGainCurveControlPoint::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, SkHdrAgtmGainCurveControlPoint::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, SkHdrAgtmGainCurveControlPoint::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, SkHdrAgtmGainCurveControlPoint::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}














class  SkHdrMasteringDisplayColorVolume {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SkHdrMasteringDisplayColorVolume, T>::value>;
  using DataView = SkHdrMasteringDisplayColorVolumeDataView;
  using Data_ = internal::SkHdrMasteringDisplayColorVolume_Data;

  template <typename... Args>
  static SkHdrMasteringDisplayColorVolumePtr New(Args&&... args) {
    return SkHdrMasteringDisplayColorVolumePtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SkHdrMasteringDisplayColorVolumePtr From(const U& u) {
    return mojo::TypeConverter<SkHdrMasteringDisplayColorVolumePtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SkHdrMasteringDisplayColorVolume>::Convert(*this);
  }


  SkHdrMasteringDisplayColorVolume();

  SkHdrMasteringDisplayColorVolume(
      const ::SkColorSpacePrimaries& primaries,
      float max_luminance,
      float min_luminance);


  ~SkHdrMasteringDisplayColorVolume();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SkHdrMasteringDisplayColorVolumePtr>
  SkHdrMasteringDisplayColorVolumePtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SkHdrMasteringDisplayColorVolume::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SkHdrMasteringDisplayColorVolume::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SkHdrMasteringDisplayColorVolume::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrMasteringDisplayColorVolume::DataView, ::blink::Vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrMasteringDisplayColorVolume::DataView, ::blink::Vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SkHdrMasteringDisplayColorVolume::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SkHdrMasteringDisplayColorVolume_UnserializedMessageContext<
            UserType, SkHdrMasteringDisplayColorVolume::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SkHdrMasteringDisplayColorVolume::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SkHdrMasteringDisplayColorVolume::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SkHdrMasteringDisplayColorVolume_UnserializedMessageContext<
            UserType, SkHdrMasteringDisplayColorVolume::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SkHdrMasteringDisplayColorVolume::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::SkColorSpacePrimaries primaries;
  
  float max_luminance;
  
  float min_luminance;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, SkHdrMasteringDisplayColorVolume::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, SkHdrMasteringDisplayColorVolume::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, SkHdrMasteringDisplayColorVolume::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, SkHdrMasteringDisplayColorVolume::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}






class  SkHdrAgtmGainCurve {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SkHdrAgtmGainCurve, T>::value>;
  using DataView = SkHdrAgtmGainCurveDataView;
  using Data_ = internal::SkHdrAgtmGainCurve_Data;

  template <typename... Args>
  static SkHdrAgtmGainCurvePtr New(Args&&... args) {
    return SkHdrAgtmGainCurvePtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SkHdrAgtmGainCurvePtr From(const U& u) {
    return mojo::TypeConverter<SkHdrAgtmGainCurvePtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SkHdrAgtmGainCurve>::Convert(*this);
  }


  SkHdrAgtmGainCurve();

  explicit SkHdrAgtmGainCurve(
      ::blink::Vector<::skhdr::AdaptiveGlobalToneMap::GainCurve::ControlPoint> control_points);


  ~SkHdrAgtmGainCurve();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SkHdrAgtmGainCurvePtr>
  SkHdrAgtmGainCurvePtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SkHdrAgtmGainCurve::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SkHdrAgtmGainCurve::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SkHdrAgtmGainCurve::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAgtmGainCurve::DataView, ::blink::Vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAgtmGainCurve::DataView, ::blink::Vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SkHdrAgtmGainCurve::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SkHdrAgtmGainCurve_UnserializedMessageContext<
            UserType, SkHdrAgtmGainCurve::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SkHdrAgtmGainCurve::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SkHdrAgtmGainCurve::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SkHdrAgtmGainCurve_UnserializedMessageContext<
            UserType, SkHdrAgtmGainCurve::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SkHdrAgtmGainCurve::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::blink::Vector<::skhdr::AdaptiveGlobalToneMap::GainCurve::ControlPoint> control_points;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, SkHdrAgtmGainCurve::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, SkHdrAgtmGainCurve::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, SkHdrAgtmGainCurve::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, SkHdrAgtmGainCurve::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class  SkHdrAgtmComponentMixingFunction {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SkHdrAgtmComponentMixingFunction, T>::value>;
  using DataView = SkHdrAgtmComponentMixingFunctionDataView;
  using Data_ = internal::SkHdrAgtmComponentMixingFunction_Data;

  template <typename... Args>
  static SkHdrAgtmComponentMixingFunctionPtr New(Args&&... args) {
    return SkHdrAgtmComponentMixingFunctionPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SkHdrAgtmComponentMixingFunctionPtr From(const U& u) {
    return mojo::TypeConverter<SkHdrAgtmComponentMixingFunctionPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SkHdrAgtmComponentMixingFunction>::Convert(*this);
  }


  SkHdrAgtmComponentMixingFunction();

  SkHdrAgtmComponentMixingFunction(
      float red,
      float green,
      float blue,
      float max,
      float min,
      float component);


  ~SkHdrAgtmComponentMixingFunction();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SkHdrAgtmComponentMixingFunctionPtr>
  SkHdrAgtmComponentMixingFunctionPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SkHdrAgtmComponentMixingFunction::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SkHdrAgtmComponentMixingFunction::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SkHdrAgtmComponentMixingFunction::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAgtmComponentMixingFunction::DataView, ::blink::Vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAgtmComponentMixingFunction::DataView, ::blink::Vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SkHdrAgtmComponentMixingFunction::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SkHdrAgtmComponentMixingFunction_UnserializedMessageContext<
            UserType, SkHdrAgtmComponentMixingFunction::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SkHdrAgtmComponentMixingFunction::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SkHdrAgtmComponentMixingFunction::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SkHdrAgtmComponentMixingFunction_UnserializedMessageContext<
            UserType, SkHdrAgtmComponentMixingFunction::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SkHdrAgtmComponentMixingFunction::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  float red;
  
  float green;
  
  float blue;
  
  float max;
  
  float min;
  
  float component;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, SkHdrAgtmComponentMixingFunction::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, SkHdrAgtmComponentMixingFunction::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, SkHdrAgtmComponentMixingFunction::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, SkHdrAgtmComponentMixingFunction::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class  SkHdrAgtmColorGainFunction {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SkHdrAgtmColorGainFunction, T>::value>;
  using DataView = SkHdrAgtmColorGainFunctionDataView;
  using Data_ = internal::SkHdrAgtmColorGainFunction_Data;

  template <typename... Args>
  static SkHdrAgtmColorGainFunctionPtr New(Args&&... args) {
    return SkHdrAgtmColorGainFunctionPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SkHdrAgtmColorGainFunctionPtr From(const U& u) {
    return mojo::TypeConverter<SkHdrAgtmColorGainFunctionPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SkHdrAgtmColorGainFunction>::Convert(*this);
  }


  SkHdrAgtmColorGainFunction();

  SkHdrAgtmColorGainFunction(
      const ::skhdr::AdaptiveGlobalToneMap::ComponentMixingFunction& component_mixing,
      const ::skhdr::AdaptiveGlobalToneMap::GainCurve& gain_curve);


  ~SkHdrAgtmColorGainFunction();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SkHdrAgtmColorGainFunctionPtr>
  SkHdrAgtmColorGainFunctionPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SkHdrAgtmColorGainFunction::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SkHdrAgtmColorGainFunction::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SkHdrAgtmColorGainFunction::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAgtmColorGainFunction::DataView, ::blink::Vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAgtmColorGainFunction::DataView, ::blink::Vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SkHdrAgtmColorGainFunction::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SkHdrAgtmColorGainFunction_UnserializedMessageContext<
            UserType, SkHdrAgtmColorGainFunction::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SkHdrAgtmColorGainFunction::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SkHdrAgtmColorGainFunction::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SkHdrAgtmColorGainFunction_UnserializedMessageContext<
            UserType, SkHdrAgtmColorGainFunction::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SkHdrAgtmColorGainFunction::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::skhdr::AdaptiveGlobalToneMap::ComponentMixingFunction component_mixing;
  
  ::skhdr::AdaptiveGlobalToneMap::GainCurve gain_curve;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, SkHdrAgtmColorGainFunction::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, SkHdrAgtmColorGainFunction::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, SkHdrAgtmColorGainFunction::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, SkHdrAgtmColorGainFunction::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class  SkHdrAgtmAlternateImage {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SkHdrAgtmAlternateImage, T>::value>;
  using DataView = SkHdrAgtmAlternateImageDataView;
  using Data_ = internal::SkHdrAgtmAlternateImage_Data;

  template <typename... Args>
  static SkHdrAgtmAlternateImagePtr New(Args&&... args) {
    return SkHdrAgtmAlternateImagePtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SkHdrAgtmAlternateImagePtr From(const U& u) {
    return mojo::TypeConverter<SkHdrAgtmAlternateImagePtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SkHdrAgtmAlternateImage>::Convert(*this);
  }


  SkHdrAgtmAlternateImage();

  SkHdrAgtmAlternateImage(
      float hdr_headroom,
      const ::skhdr::AdaptiveGlobalToneMap::ColorGainFunction& color_gain_function);


  ~SkHdrAgtmAlternateImage();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SkHdrAgtmAlternateImagePtr>
  SkHdrAgtmAlternateImagePtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SkHdrAgtmAlternateImage::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SkHdrAgtmAlternateImage::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SkHdrAgtmAlternateImage::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAgtmAlternateImage::DataView, ::blink::Vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAgtmAlternateImage::DataView, ::blink::Vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SkHdrAgtmAlternateImage::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SkHdrAgtmAlternateImage_UnserializedMessageContext<
            UserType, SkHdrAgtmAlternateImage::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SkHdrAgtmAlternateImage::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SkHdrAgtmAlternateImage::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SkHdrAgtmAlternateImage_UnserializedMessageContext<
            UserType, SkHdrAgtmAlternateImage::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SkHdrAgtmAlternateImage::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  float hdr_headroom;
  
  ::skhdr::AdaptiveGlobalToneMap::ColorGainFunction color_gain_function;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, SkHdrAgtmAlternateImage::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, SkHdrAgtmAlternateImage::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, SkHdrAgtmAlternateImage::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, SkHdrAgtmAlternateImage::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class  SkHdrAgtmHeadroomAdaptiveToneMap {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SkHdrAgtmHeadroomAdaptiveToneMap, T>::value>;
  using DataView = SkHdrAgtmHeadroomAdaptiveToneMapDataView;
  using Data_ = internal::SkHdrAgtmHeadroomAdaptiveToneMap_Data;

  template <typename... Args>
  static SkHdrAgtmHeadroomAdaptiveToneMapPtr New(Args&&... args) {
    return SkHdrAgtmHeadroomAdaptiveToneMapPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SkHdrAgtmHeadroomAdaptiveToneMapPtr From(const U& u) {
    return mojo::TypeConverter<SkHdrAgtmHeadroomAdaptiveToneMapPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SkHdrAgtmHeadroomAdaptiveToneMap>::Convert(*this);
  }


  SkHdrAgtmHeadroomAdaptiveToneMap();

  SkHdrAgtmHeadroomAdaptiveToneMap(
      float baseline_hdr_headroom,
      const ::SkColorSpacePrimaries& gain_application_space_primaries,
      ::blink::Vector<::skhdr::AdaptiveGlobalToneMap::AlternateImage> alternate_images);


  ~SkHdrAgtmHeadroomAdaptiveToneMap();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SkHdrAgtmHeadroomAdaptiveToneMapPtr>
  SkHdrAgtmHeadroomAdaptiveToneMapPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SkHdrAgtmHeadroomAdaptiveToneMap::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SkHdrAgtmHeadroomAdaptiveToneMap::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SkHdrAgtmHeadroomAdaptiveToneMap::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAgtmHeadroomAdaptiveToneMap::DataView, ::blink::Vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAgtmHeadroomAdaptiveToneMap::DataView, ::blink::Vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SkHdrAgtmHeadroomAdaptiveToneMap::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SkHdrAgtmHeadroomAdaptiveToneMap_UnserializedMessageContext<
            UserType, SkHdrAgtmHeadroomAdaptiveToneMap::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SkHdrAgtmHeadroomAdaptiveToneMap::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SkHdrAgtmHeadroomAdaptiveToneMap::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SkHdrAgtmHeadroomAdaptiveToneMap_UnserializedMessageContext<
            UserType, SkHdrAgtmHeadroomAdaptiveToneMap::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SkHdrAgtmHeadroomAdaptiveToneMap::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  float baseline_hdr_headroom;
  
  ::SkColorSpacePrimaries gain_application_space_primaries;
  
  ::blink::Vector<::skhdr::AdaptiveGlobalToneMap::AlternateImage> alternate_images;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, SkHdrAgtmHeadroomAdaptiveToneMap::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, SkHdrAgtmHeadroomAdaptiveToneMap::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, SkHdrAgtmHeadroomAdaptiveToneMap::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, SkHdrAgtmHeadroomAdaptiveToneMap::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class  SkHdrAdaptiveGlobalToneMap {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SkHdrAdaptiveGlobalToneMap, T>::value>;
  using DataView = SkHdrAdaptiveGlobalToneMapDataView;
  using Data_ = internal::SkHdrAdaptiveGlobalToneMap_Data;

  template <typename... Args>
  static SkHdrAdaptiveGlobalToneMapPtr New(Args&&... args) {
    return SkHdrAdaptiveGlobalToneMapPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SkHdrAdaptiveGlobalToneMapPtr From(const U& u) {
    return mojo::TypeConverter<SkHdrAdaptiveGlobalToneMapPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SkHdrAdaptiveGlobalToneMap>::Convert(*this);
  }


  SkHdrAdaptiveGlobalToneMap();

  SkHdrAdaptiveGlobalToneMap(
      float hdr_reference_white,
      const std::optional<::skhdr::AdaptiveGlobalToneMap::HeadroomAdaptiveToneMap>& headroom_adaptive_tone_map);


  ~SkHdrAdaptiveGlobalToneMap();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SkHdrAdaptiveGlobalToneMapPtr>
  SkHdrAdaptiveGlobalToneMapPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SkHdrAdaptiveGlobalToneMap::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SkHdrAdaptiveGlobalToneMap::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SkHdrAdaptiveGlobalToneMap::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAdaptiveGlobalToneMap::DataView, ::blink::Vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static ::blink::Vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SkHdrAdaptiveGlobalToneMap::DataView, ::blink::Vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SkHdrAdaptiveGlobalToneMap::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SkHdrAdaptiveGlobalToneMap_UnserializedMessageContext<
            UserType, SkHdrAdaptiveGlobalToneMap::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SkHdrAdaptiveGlobalToneMap::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SkHdrAdaptiveGlobalToneMap::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SkHdrAdaptiveGlobalToneMap_UnserializedMessageContext<
            UserType, SkHdrAdaptiveGlobalToneMap::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SkHdrAdaptiveGlobalToneMap::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  float hdr_reference_white;
  
  std::optional<::skhdr::AdaptiveGlobalToneMap::HeadroomAdaptiveToneMap> headroom_adaptive_tone_map;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, SkHdrAdaptiveGlobalToneMap::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, SkHdrAdaptiveGlobalToneMap::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, SkHdrAdaptiveGlobalToneMap::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, SkHdrAdaptiveGlobalToneMap::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}

template <typename StructPtrType>
SkHdrContentLightLevelInformationPtr SkHdrContentLightLevelInformation::Clone() const {
  return New(
      mojo::Clone(max_cll),
      mojo::Clone(max_fall)
  );
}

template <typename T, SkHdrContentLightLevelInformation::EnableIfSame<T>*>
bool SkHdrContentLightLevelInformation::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->max_cll, other_struct.max_cll))
    return false;
  if (!mojo::Equals(this->max_fall, other_struct.max_fall))
    return false;
  return true;
}

template <typename T, SkHdrContentLightLevelInformation::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.max_cll < rhs.max_cll)
    return true;
  if (rhs.max_cll < lhs.max_cll)
    return false;
  if (lhs.max_fall < rhs.max_fall)
    return true;
  if (rhs.max_fall < lhs.max_fall)
    return false;
  return false;
}
template <typename StructPtrType>
SkHdrMasteringDisplayColorVolumePtr SkHdrMasteringDisplayColorVolume::Clone() const {
  return New(
      mojo::Clone(primaries),
      mojo::Clone(max_luminance),
      mojo::Clone(min_luminance)
  );
}

template <typename T, SkHdrMasteringDisplayColorVolume::EnableIfSame<T>*>
bool SkHdrMasteringDisplayColorVolume::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->primaries, other_struct.primaries))
    return false;
  if (!mojo::Equals(this->max_luminance, other_struct.max_luminance))
    return false;
  if (!mojo::Equals(this->min_luminance, other_struct.min_luminance))
    return false;
  return true;
}

template <typename T, SkHdrMasteringDisplayColorVolume::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.primaries < rhs.primaries)
    return true;
  if (rhs.primaries < lhs.primaries)
    return false;
  if (lhs.max_luminance < rhs.max_luminance)
    return true;
  if (rhs.max_luminance < lhs.max_luminance)
    return false;
  if (lhs.min_luminance < rhs.min_luminance)
    return true;
  if (rhs.min_luminance < lhs.min_luminance)
    return false;
  return false;
}
template <typename StructPtrType>
SkHdrAgtmGainCurveControlPointPtr SkHdrAgtmGainCurveControlPoint::Clone() const {
  return New(
      mojo::Clone(x),
      mojo::Clone(y),
      mojo::Clone(m)
  );
}

template <typename T, SkHdrAgtmGainCurveControlPoint::EnableIfSame<T>*>
bool SkHdrAgtmGainCurveControlPoint::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->x, other_struct.x))
    return false;
  if (!mojo::Equals(this->y, other_struct.y))
    return false;
  if (!mojo::Equals(this->m, other_struct.m))
    return false;
  return true;
}

template <typename T, SkHdrAgtmGainCurveControlPoint::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.x < rhs.x)
    return true;
  if (rhs.x < lhs.x)
    return false;
  if (lhs.y < rhs.y)
    return true;
  if (rhs.y < lhs.y)
    return false;
  if (lhs.m < rhs.m)
    return true;
  if (rhs.m < lhs.m)
    return false;
  return false;
}
template <typename StructPtrType>
SkHdrAgtmGainCurvePtr SkHdrAgtmGainCurve::Clone() const {
  return New(
      mojo::Clone(control_points)
  );
}

template <typename T, SkHdrAgtmGainCurve::EnableIfSame<T>*>
bool SkHdrAgtmGainCurve::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->control_points, other_struct.control_points))
    return false;
  return true;
}

template <typename T, SkHdrAgtmGainCurve::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.control_points < rhs.control_points)
    return true;
  if (rhs.control_points < lhs.control_points)
    return false;
  return false;
}
template <typename StructPtrType>
SkHdrAgtmComponentMixingFunctionPtr SkHdrAgtmComponentMixingFunction::Clone() const {
  return New(
      mojo::Clone(red),
      mojo::Clone(green),
      mojo::Clone(blue),
      mojo::Clone(max),
      mojo::Clone(min),
      mojo::Clone(component)
  );
}

template <typename T, SkHdrAgtmComponentMixingFunction::EnableIfSame<T>*>
bool SkHdrAgtmComponentMixingFunction::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->red, other_struct.red))
    return false;
  if (!mojo::Equals(this->green, other_struct.green))
    return false;
  if (!mojo::Equals(this->blue, other_struct.blue))
    return false;
  if (!mojo::Equals(this->max, other_struct.max))
    return false;
  if (!mojo::Equals(this->min, other_struct.min))
    return false;
  if (!mojo::Equals(this->component, other_struct.component))
    return false;
  return true;
}

template <typename T, SkHdrAgtmComponentMixingFunction::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.red < rhs.red)
    return true;
  if (rhs.red < lhs.red)
    return false;
  if (lhs.green < rhs.green)
    return true;
  if (rhs.green < lhs.green)
    return false;
  if (lhs.blue < rhs.blue)
    return true;
  if (rhs.blue < lhs.blue)
    return false;
  if (lhs.max < rhs.max)
    return true;
  if (rhs.max < lhs.max)
    return false;
  if (lhs.min < rhs.min)
    return true;
  if (rhs.min < lhs.min)
    return false;
  if (lhs.component < rhs.component)
    return true;
  if (rhs.component < lhs.component)
    return false;
  return false;
}
template <typename StructPtrType>
SkHdrAgtmColorGainFunctionPtr SkHdrAgtmColorGainFunction::Clone() const {
  return New(
      mojo::Clone(component_mixing),
      mojo::Clone(gain_curve)
  );
}

template <typename T, SkHdrAgtmColorGainFunction::EnableIfSame<T>*>
bool SkHdrAgtmColorGainFunction::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->component_mixing, other_struct.component_mixing))
    return false;
  if (!mojo::Equals(this->gain_curve, other_struct.gain_curve))
    return false;
  return true;
}

template <typename T, SkHdrAgtmColorGainFunction::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.component_mixing < rhs.component_mixing)
    return true;
  if (rhs.component_mixing < lhs.component_mixing)
    return false;
  if (lhs.gain_curve < rhs.gain_curve)
    return true;
  if (rhs.gain_curve < lhs.gain_curve)
    return false;
  return false;
}
template <typename StructPtrType>
SkHdrAgtmAlternateImagePtr SkHdrAgtmAlternateImage::Clone() const {
  return New(
      mojo::Clone(hdr_headroom),
      mojo::Clone(color_gain_function)
  );
}

template <typename T, SkHdrAgtmAlternateImage::EnableIfSame<T>*>
bool SkHdrAgtmAlternateImage::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->hdr_headroom, other_struct.hdr_headroom))
    return false;
  if (!mojo::Equals(this->color_gain_function, other_struct.color_gain_function))
    return false;
  return true;
}

template <typename T, SkHdrAgtmAlternateImage::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.hdr_headroom < rhs.hdr_headroom)
    return true;
  if (rhs.hdr_headroom < lhs.hdr_headroom)
    return false;
  if (lhs.color_gain_function < rhs.color_gain_function)
    return true;
  if (rhs.color_gain_function < lhs.color_gain_function)
    return false;
  return false;
}
template <typename StructPtrType>
SkHdrAgtmHeadroomAdaptiveToneMapPtr SkHdrAgtmHeadroomAdaptiveToneMap::Clone() const {
  return New(
      mojo::Clone(baseline_hdr_headroom),
      mojo::Clone(gain_application_space_primaries),
      mojo::Clone(alternate_images)
  );
}

template <typename T, SkHdrAgtmHeadroomAdaptiveToneMap::EnableIfSame<T>*>
bool SkHdrAgtmHeadroomAdaptiveToneMap::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->baseline_hdr_headroom, other_struct.baseline_hdr_headroom))
    return false;
  if (!mojo::Equals(this->gain_application_space_primaries, other_struct.gain_application_space_primaries))
    return false;
  if (!mojo::Equals(this->alternate_images, other_struct.alternate_images))
    return false;
  return true;
}

template <typename T, SkHdrAgtmHeadroomAdaptiveToneMap::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.baseline_hdr_headroom < rhs.baseline_hdr_headroom)
    return true;
  if (rhs.baseline_hdr_headroom < lhs.baseline_hdr_headroom)
    return false;
  if (lhs.gain_application_space_primaries < rhs.gain_application_space_primaries)
    return true;
  if (rhs.gain_application_space_primaries < lhs.gain_application_space_primaries)
    return false;
  if (lhs.alternate_images < rhs.alternate_images)
    return true;
  if (rhs.alternate_images < lhs.alternate_images)
    return false;
  return false;
}
template <typename StructPtrType>
SkHdrAdaptiveGlobalToneMapPtr SkHdrAdaptiveGlobalToneMap::Clone() const {
  return New(
      mojo::Clone(hdr_reference_white),
      mojo::Clone(headroom_adaptive_tone_map)
  );
}

template <typename T, SkHdrAdaptiveGlobalToneMap::EnableIfSame<T>*>
bool SkHdrAdaptiveGlobalToneMap::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->hdr_reference_white, other_struct.hdr_reference_white))
    return false;
  if (!mojo::Equals(this->headroom_adaptive_tone_map, other_struct.headroom_adaptive_tone_map))
    return false;
  return true;
}

template <typename T, SkHdrAdaptiveGlobalToneMap::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.hdr_reference_white < rhs.hdr_reference_white)
    return true;
  if (rhs.hdr_reference_white < lhs.hdr_reference_white)
    return false;
  if (lhs.headroom_adaptive_tone_map < rhs.headroom_adaptive_tone_map)
    return true;
  if (rhs.headroom_adaptive_tone_map < lhs.headroom_adaptive_tone_map)
    return false;
  return false;
}


}  // skia::mojom::blink

namespace mojo {


template <>
struct  StructTraits<::skia::mojom::blink::SkHdrContentLightLevelInformation::DataView,
                                         ::skia::mojom::blink::SkHdrContentLightLevelInformationPtr> {
  static bool IsNull(const ::skia::mojom::blink::SkHdrContentLightLevelInformationPtr& input) { return !input; }
  static void SetToNull(::skia::mojom::blink::SkHdrContentLightLevelInformationPtr* output) { output->reset(); }

  static decltype(::skia::mojom::blink::SkHdrContentLightLevelInformation::max_cll) max_cll(
      const ::skia::mojom::blink::SkHdrContentLightLevelInformationPtr& input) {
    return input->max_cll;
  }

  static decltype(::skia::mojom::blink::SkHdrContentLightLevelInformation::max_fall) max_fall(
      const ::skia::mojom::blink::SkHdrContentLightLevelInformationPtr& input) {
    return input->max_fall;
  }

  static bool Read(::skia::mojom::blink::SkHdrContentLightLevelInformation::DataView input, ::skia::mojom::blink::SkHdrContentLightLevelInformationPtr* output);
};


template <>
struct  StructTraits<::skia::mojom::blink::SkHdrMasteringDisplayColorVolume::DataView,
                                         ::skia::mojom::blink::SkHdrMasteringDisplayColorVolumePtr> {
  static bool IsNull(const ::skia::mojom::blink::SkHdrMasteringDisplayColorVolumePtr& input) { return !input; }
  static void SetToNull(::skia::mojom::blink::SkHdrMasteringDisplayColorVolumePtr* output) { output->reset(); }

  static const decltype(::skia::mojom::blink::SkHdrMasteringDisplayColorVolume::primaries)& primaries(
      const ::skia::mojom::blink::SkHdrMasteringDisplayColorVolumePtr& input) {
    return input->primaries;
  }

  static decltype(::skia::mojom::blink::SkHdrMasteringDisplayColorVolume::max_luminance) max_luminance(
      const ::skia::mojom::blink::SkHdrMasteringDisplayColorVolumePtr& input) {
    return input->max_luminance;
  }

  static decltype(::skia::mojom::blink::SkHdrMasteringDisplayColorVolume::min_luminance) min_luminance(
      const ::skia::mojom::blink::SkHdrMasteringDisplayColorVolumePtr& input) {
    return input->min_luminance;
  }

  static bool Read(::skia::mojom::blink::SkHdrMasteringDisplayColorVolume::DataView input, ::skia::mojom::blink::SkHdrMasteringDisplayColorVolumePtr* output);
};


template <>
struct  StructTraits<::skia::mojom::blink::SkHdrAgtmGainCurveControlPoint::DataView,
                                         ::skia::mojom::blink::SkHdrAgtmGainCurveControlPointPtr> {
  static bool IsNull(const ::skia::mojom::blink::SkHdrAgtmGainCurveControlPointPtr& input) { return !input; }
  static void SetToNull(::skia::mojom::blink::SkHdrAgtmGainCurveControlPointPtr* output) { output->reset(); }

  static decltype(::skia::mojom::blink::SkHdrAgtmGainCurveControlPoint::x) x(
      const ::skia::mojom::blink::SkHdrAgtmGainCurveControlPointPtr& input) {
    return input->x;
  }

  static decltype(::skia::mojom::blink::SkHdrAgtmGainCurveControlPoint::y) y(
      const ::skia::mojom::blink::SkHdrAgtmGainCurveControlPointPtr& input) {
    return input->y;
  }

  static decltype(::skia::mojom::blink::SkHdrAgtmGainCurveControlPoint::m) m(
      const ::skia::mojom::blink::SkHdrAgtmGainCurveControlPointPtr& input) {
    return input->m;
  }

  static bool Read(::skia::mojom::blink::SkHdrAgtmGainCurveControlPoint::DataView input, ::skia::mojom::blink::SkHdrAgtmGainCurveControlPointPtr* output);
};


template <>
struct  StructTraits<::skia::mojom::blink::SkHdrAgtmGainCurve::DataView,
                                         ::skia::mojom::blink::SkHdrAgtmGainCurvePtr> {
  static bool IsNull(const ::skia::mojom::blink::SkHdrAgtmGainCurvePtr& input) { return !input; }
  static void SetToNull(::skia::mojom::blink::SkHdrAgtmGainCurvePtr* output) { output->reset(); }

  static const decltype(::skia::mojom::blink::SkHdrAgtmGainCurve::control_points)& control_points(
      const ::skia::mojom::blink::SkHdrAgtmGainCurvePtr& input) {
    return input->control_points;
  }

  static bool Read(::skia::mojom::blink::SkHdrAgtmGainCurve::DataView input, ::skia::mojom::blink::SkHdrAgtmGainCurvePtr* output);
};


template <>
struct  StructTraits<::skia::mojom::blink::SkHdrAgtmComponentMixingFunction::DataView,
                                         ::skia::mojom::blink::SkHdrAgtmComponentMixingFunctionPtr> {
  static bool IsNull(const ::skia::mojom::blink::SkHdrAgtmComponentMixingFunctionPtr& input) { return !input; }
  static void SetToNull(::skia::mojom::blink::SkHdrAgtmComponentMixingFunctionPtr* output) { output->reset(); }

  static decltype(::skia::mojom::blink::SkHdrAgtmComponentMixingFunction::red) red(
      const ::skia::mojom::blink::SkHdrAgtmComponentMixingFunctionPtr& input) {
    return input->red;
  }

  static decltype(::skia::mojom::blink::SkHdrAgtmComponentMixingFunction::green) green(
      const ::skia::mojom::blink::SkHdrAgtmComponentMixingFunctionPtr& input) {
    return input->green;
  }

  static decltype(::skia::mojom::blink::SkHdrAgtmComponentMixingFunction::blue) blue(
      const ::skia::mojom::blink::SkHdrAgtmComponentMixingFunctionPtr& input) {
    return input->blue;
  }

  static decltype(::skia::mojom::blink::SkHdrAgtmComponentMixingFunction::max) max(
      const ::skia::mojom::blink::SkHdrAgtmComponentMixingFunctionPtr& input) {
    return input->max;
  }

  static decltype(::skia::mojom::blink::SkHdrAgtmComponentMixingFunction::min) min(
      const ::skia::mojom::blink::SkHdrAgtmComponentMixingFunctionPtr& input) {
    return input->min;
  }

  static decltype(::skia::mojom::blink::SkHdrAgtmComponentMixingFunction::component) component(
      const ::skia::mojom::blink::SkHdrAgtmComponentMixingFunctionPtr& input) {
    return input->component;
  }

  static bool Read(::skia::mojom::blink::SkHdrAgtmComponentMixingFunction::DataView input, ::skia::mojom::blink::SkHdrAgtmComponentMixingFunctionPtr* output);
};


template <>
struct  StructTraits<::skia::mojom::blink::SkHdrAgtmColorGainFunction::DataView,
                                         ::skia::mojom::blink::SkHdrAgtmColorGainFunctionPtr> {
  static bool IsNull(const ::skia::mojom::blink::SkHdrAgtmColorGainFunctionPtr& input) { return !input; }
  static void SetToNull(::skia::mojom::blink::SkHdrAgtmColorGainFunctionPtr* output) { output->reset(); }

  static const decltype(::skia::mojom::blink::SkHdrAgtmColorGainFunction::component_mixing)& component_mixing(
      const ::skia::mojom::blink::SkHdrAgtmColorGainFunctionPtr& input) {
    return input->component_mixing;
  }

  static const decltype(::skia::mojom::blink::SkHdrAgtmColorGainFunction::gain_curve)& gain_curve(
      const ::skia::mojom::blink::SkHdrAgtmColorGainFunctionPtr& input) {
    return input->gain_curve;
  }

  static bool Read(::skia::mojom::blink::SkHdrAgtmColorGainFunction::DataView input, ::skia::mojom::blink::SkHdrAgtmColorGainFunctionPtr* output);
};


template <>
struct  StructTraits<::skia::mojom::blink::SkHdrAgtmAlternateImage::DataView,
                                         ::skia::mojom::blink::SkHdrAgtmAlternateImagePtr> {
  static bool IsNull(const ::skia::mojom::blink::SkHdrAgtmAlternateImagePtr& input) { return !input; }
  static void SetToNull(::skia::mojom::blink::SkHdrAgtmAlternateImagePtr* output) { output->reset(); }

  static decltype(::skia::mojom::blink::SkHdrAgtmAlternateImage::hdr_headroom) hdr_headroom(
      const ::skia::mojom::blink::SkHdrAgtmAlternateImagePtr& input) {
    return input->hdr_headroom;
  }

  static const decltype(::skia::mojom::blink::SkHdrAgtmAlternateImage::color_gain_function)& color_gain_function(
      const ::skia::mojom::blink::SkHdrAgtmAlternateImagePtr& input) {
    return input->color_gain_function;
  }

  static bool Read(::skia::mojom::blink::SkHdrAgtmAlternateImage::DataView input, ::skia::mojom::blink::SkHdrAgtmAlternateImagePtr* output);
};


template <>
struct  StructTraits<::skia::mojom::blink::SkHdrAgtmHeadroomAdaptiveToneMap::DataView,
                                         ::skia::mojom::blink::SkHdrAgtmHeadroomAdaptiveToneMapPtr> {
  static bool IsNull(const ::skia::mojom::blink::SkHdrAgtmHeadroomAdaptiveToneMapPtr& input) { return !input; }
  static void SetToNull(::skia::mojom::blink::SkHdrAgtmHeadroomAdaptiveToneMapPtr* output) { output->reset(); }

  static decltype(::skia::mojom::blink::SkHdrAgtmHeadroomAdaptiveToneMap::baseline_hdr_headroom) baseline_hdr_headroom(
      const ::skia::mojom::blink::SkHdrAgtmHeadroomAdaptiveToneMapPtr& input) {
    return input->baseline_hdr_headroom;
  }

  static const decltype(::skia::mojom::blink::SkHdrAgtmHeadroomAdaptiveToneMap::gain_application_space_primaries)& gain_application_space_primaries(
      const ::skia::mojom::blink::SkHdrAgtmHeadroomAdaptiveToneMapPtr& input) {
    return input->gain_application_space_primaries;
  }

  static const decltype(::skia::mojom::blink::SkHdrAgtmHeadroomAdaptiveToneMap::alternate_images)& alternate_images(
      const ::skia::mojom::blink::SkHdrAgtmHeadroomAdaptiveToneMapPtr& input) {
    return input->alternate_images;
  }

  static bool Read(::skia::mojom::blink::SkHdrAgtmHeadroomAdaptiveToneMap::DataView input, ::skia::mojom::blink::SkHdrAgtmHeadroomAdaptiveToneMapPtr* output);
};


template <>
struct  StructTraits<::skia::mojom::blink::SkHdrAdaptiveGlobalToneMap::DataView,
                                         ::skia::mojom::blink::SkHdrAdaptiveGlobalToneMapPtr> {
  static bool IsNull(const ::skia::mojom::blink::SkHdrAdaptiveGlobalToneMapPtr& input) { return !input; }
  static void SetToNull(::skia::mojom::blink::SkHdrAdaptiveGlobalToneMapPtr* output) { output->reset(); }

  static decltype(::skia::mojom::blink::SkHdrAdaptiveGlobalToneMap::hdr_reference_white) hdr_reference_white(
      const ::skia::mojom::blink::SkHdrAdaptiveGlobalToneMapPtr& input) {
    return input->hdr_reference_white;
  }

  static const decltype(::skia::mojom::blink::SkHdrAdaptiveGlobalToneMap::headroom_adaptive_tone_map)& headroom_adaptive_tone_map(
      const ::skia::mojom::blink::SkHdrAdaptiveGlobalToneMapPtr& input) {
    return input->headroom_adaptive_tone_map;
  }

  static bool Read(::skia::mojom::blink::SkHdrAdaptiveGlobalToneMap::DataView input, ::skia::mojom::blink::SkHdrAdaptiveGlobalToneMapPtr* output);
};

}  // namespace mojo

#endif  // SKIA_PUBLIC_MOJOM_HDR_METADATA_MOJOM_BLINK_H_