// skia/public/mojom/hdr_metadata.mojom.cc 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.

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif

#include "skia/public/mojom/hdr_metadata.mojom.h"
#include <stdint.h>
#include <utility>
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"

#include "skia/public/mojom/hdr_metadata.mojom-params-data.h"
#include "skia/public/mojom/hdr_metadata.mojom-shared-message-ids.h"

#include "skia/public/mojom/hdr_metadata.mojom-import-headers.h"
#include "skia/public/mojom/hdr_metadata.mojom-test-utils.h"


namespace skia::mojom {
SkHdrContentLightLevelInformation::SkHdrContentLightLevelInformation()
    : max_cll(),
      max_fall() {}

SkHdrContentLightLevelInformation::SkHdrContentLightLevelInformation(
    float max_cll_in,
    float max_fall_in)
    : max_cll(std::move(max_cll_in)),
      max_fall(std::move(max_fall_in)) {}

SkHdrContentLightLevelInformation::~SkHdrContentLightLevelInformation() = default;

void SkHdrContentLightLevelInformation::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "max_cll"), this->max_cll,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "max_fall"), this->max_fall,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool SkHdrContentLightLevelInformation::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SkHdrMasteringDisplayColorVolume::SkHdrMasteringDisplayColorVolume()
    : primaries(),
      max_luminance(),
      min_luminance() {}

SkHdrMasteringDisplayColorVolume::SkHdrMasteringDisplayColorVolume(
    const ::SkColorSpacePrimaries& primaries_in,
    float max_luminance_in,
    float min_luminance_in)
    : primaries(std::move(primaries_in)),
      max_luminance(std::move(max_luminance_in)),
      min_luminance(std::move(min_luminance_in)) {}

SkHdrMasteringDisplayColorVolume::~SkHdrMasteringDisplayColorVolume() = default;

void SkHdrMasteringDisplayColorVolume::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "primaries"), this->primaries,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::SkColorSpacePrimaries&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "max_luminance"), this->max_luminance,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "min_luminance"), this->min_luminance,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool SkHdrMasteringDisplayColorVolume::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SkHdrAgtmGainCurveControlPoint::SkHdrAgtmGainCurveControlPoint()
    : x(),
      y(),
      m() {}

SkHdrAgtmGainCurveControlPoint::SkHdrAgtmGainCurveControlPoint(
    float x_in,
    float y_in,
    float m_in)
    : x(std::move(x_in)),
      y(std::move(y_in)),
      m(std::move(m_in)) {}

SkHdrAgtmGainCurveControlPoint::~SkHdrAgtmGainCurveControlPoint() = default;

void SkHdrAgtmGainCurveControlPoint::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "x"), this->x,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "y"), this->y,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "m"), this->m,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool SkHdrAgtmGainCurveControlPoint::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SkHdrAgtmGainCurve::SkHdrAgtmGainCurve()
    : control_points() {}

SkHdrAgtmGainCurve::SkHdrAgtmGainCurve(
    std::vector<::skhdr::AdaptiveGlobalToneMap::GainCurve::ControlPoint> control_points_in)
    : control_points(std::move(control_points_in)) {}

SkHdrAgtmGainCurve::~SkHdrAgtmGainCurve() = default;

void SkHdrAgtmGainCurve::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "control_points"), this->control_points,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::vector<::skhdr::AdaptiveGlobalToneMap::GainCurve::ControlPoint>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool SkHdrAgtmGainCurve::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SkHdrAgtmComponentMixingFunction::SkHdrAgtmComponentMixingFunction()
    : red(),
      green(),
      blue(),
      max(),
      min(),
      component() {}

SkHdrAgtmComponentMixingFunction::SkHdrAgtmComponentMixingFunction(
    float red_in,
    float green_in,
    float blue_in,
    float max_in,
    float min_in,
    float component_in)
    : red(std::move(red_in)),
      green(std::move(green_in)),
      blue(std::move(blue_in)),
      max(std::move(max_in)),
      min(std::move(min_in)),
      component(std::move(component_in)) {}

SkHdrAgtmComponentMixingFunction::~SkHdrAgtmComponentMixingFunction() = default;

void SkHdrAgtmComponentMixingFunction::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "red"), this->red,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "green"), this->green,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "blue"), this->blue,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "max"), this->max,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "min"), this->min,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "component"), this->component,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool SkHdrAgtmComponentMixingFunction::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SkHdrAgtmColorGainFunction::SkHdrAgtmColorGainFunction()
    : component_mixing(),
      gain_curve() {}

SkHdrAgtmColorGainFunction::SkHdrAgtmColorGainFunction(
    const ::skhdr::AdaptiveGlobalToneMap::ComponentMixingFunction& component_mixing_in,
    const ::skhdr::AdaptiveGlobalToneMap::GainCurve& gain_curve_in)
    : component_mixing(std::move(component_mixing_in)),
      gain_curve(std::move(gain_curve_in)) {}

SkHdrAgtmColorGainFunction::~SkHdrAgtmColorGainFunction() = default;

void SkHdrAgtmColorGainFunction::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "component_mixing"), this->component_mixing,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::skhdr::AdaptiveGlobalToneMap::ComponentMixingFunction&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "gain_curve"), this->gain_curve,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::skhdr::AdaptiveGlobalToneMap::GainCurve&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool SkHdrAgtmColorGainFunction::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SkHdrAgtmAlternateImage::SkHdrAgtmAlternateImage()
    : hdr_headroom(),
      color_gain_function() {}

SkHdrAgtmAlternateImage::SkHdrAgtmAlternateImage(
    float hdr_headroom_in,
    const ::skhdr::AdaptiveGlobalToneMap::ColorGainFunction& color_gain_function_in)
    : hdr_headroom(std::move(hdr_headroom_in)),
      color_gain_function(std::move(color_gain_function_in)) {}

SkHdrAgtmAlternateImage::~SkHdrAgtmAlternateImage() = default;

void SkHdrAgtmAlternateImage::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "hdr_headroom"), this->hdr_headroom,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "color_gain_function"), this->color_gain_function,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::skhdr::AdaptiveGlobalToneMap::ColorGainFunction&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool SkHdrAgtmAlternateImage::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SkHdrAgtmHeadroomAdaptiveToneMap::SkHdrAgtmHeadroomAdaptiveToneMap()
    : baseline_hdr_headroom(),
      gain_application_space_primaries(),
      alternate_images() {}

SkHdrAgtmHeadroomAdaptiveToneMap::SkHdrAgtmHeadroomAdaptiveToneMap(
    float baseline_hdr_headroom_in,
    const ::SkColorSpacePrimaries& gain_application_space_primaries_in,
    std::vector<::skhdr::AdaptiveGlobalToneMap::AlternateImage> alternate_images_in)
    : baseline_hdr_headroom(std::move(baseline_hdr_headroom_in)),
      gain_application_space_primaries(std::move(gain_application_space_primaries_in)),
      alternate_images(std::move(alternate_images_in)) {}

SkHdrAgtmHeadroomAdaptiveToneMap::~SkHdrAgtmHeadroomAdaptiveToneMap() = default;

void SkHdrAgtmHeadroomAdaptiveToneMap::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "baseline_hdr_headroom"), this->baseline_hdr_headroom,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "gain_application_space_primaries"), this->gain_application_space_primaries,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::SkColorSpacePrimaries&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "alternate_images"), this->alternate_images,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::vector<::skhdr::AdaptiveGlobalToneMap::AlternateImage>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool SkHdrAgtmHeadroomAdaptiveToneMap::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SkHdrAdaptiveGlobalToneMap::SkHdrAdaptiveGlobalToneMap()
    : hdr_reference_white(),
      headroom_adaptive_tone_map() {}

SkHdrAdaptiveGlobalToneMap::SkHdrAdaptiveGlobalToneMap(
    float hdr_reference_white_in,
    const std::optional<::skhdr::AdaptiveGlobalToneMap::HeadroomAdaptiveToneMap>& headroom_adaptive_tone_map_in)
    : hdr_reference_white(std::move(hdr_reference_white_in)),
      headroom_adaptive_tone_map(std::move(headroom_adaptive_tone_map_in)) {}

SkHdrAdaptiveGlobalToneMap::~SkHdrAdaptiveGlobalToneMap() = default;

void SkHdrAdaptiveGlobalToneMap::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "hdr_reference_white"), this->hdr_reference_white,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "headroom_adaptive_tone_map"), this->headroom_adaptive_tone_map,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::skhdr::AdaptiveGlobalToneMap::HeadroomAdaptiveToneMap>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool SkHdrAdaptiveGlobalToneMap::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}


}  // skia::mojom


namespace mojo {


// static
bool StructTraits<::skia::mojom::SkHdrContentLightLevelInformation::DataView, ::skia::mojom::SkHdrContentLightLevelInformationPtr>::Read(
    ::skia::mojom::SkHdrContentLightLevelInformation::DataView input,
    ::skia::mojom::SkHdrContentLightLevelInformationPtr* output) {
  bool success = true;
  ::skia::mojom::SkHdrContentLightLevelInformationPtr result(::skia::mojom::SkHdrContentLightLevelInformation::New());
  
      if (success)
        result->max_cll = input.max_cll();
      if (success)
        result->max_fall = input.max_fall();
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::skia::mojom::SkHdrMasteringDisplayColorVolume::DataView, ::skia::mojom::SkHdrMasteringDisplayColorVolumePtr>::Read(
    ::skia::mojom::SkHdrMasteringDisplayColorVolume::DataView input,
    ::skia::mojom::SkHdrMasteringDisplayColorVolumePtr* output) {
  bool success = true;
  ::skia::mojom::SkHdrMasteringDisplayColorVolumePtr result(::skia::mojom::SkHdrMasteringDisplayColorVolume::New());
  
      if (success && !input.ReadPrimaries(&result->primaries))
        success = false;
      if (success)
        result->max_luminance = input.max_luminance();
      if (success)
        result->min_luminance = input.min_luminance();
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::skia::mojom::SkHdrAgtmGainCurveControlPoint::DataView, ::skia::mojom::SkHdrAgtmGainCurveControlPointPtr>::Read(
    ::skia::mojom::SkHdrAgtmGainCurveControlPoint::DataView input,
    ::skia::mojom::SkHdrAgtmGainCurveControlPointPtr* output) {
  bool success = true;
  ::skia::mojom::SkHdrAgtmGainCurveControlPointPtr result(::skia::mojom::SkHdrAgtmGainCurveControlPoint::New());
  
      if (success)
        result->x = input.x();
      if (success)
        result->y = input.y();
      if (success)
        result->m = input.m();
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::skia::mojom::SkHdrAgtmGainCurve::DataView, ::skia::mojom::SkHdrAgtmGainCurvePtr>::Read(
    ::skia::mojom::SkHdrAgtmGainCurve::DataView input,
    ::skia::mojom::SkHdrAgtmGainCurvePtr* output) {
  bool success = true;
  ::skia::mojom::SkHdrAgtmGainCurvePtr result(::skia::mojom::SkHdrAgtmGainCurve::New());
  
      if (success && !input.ReadControlPoints(&result->control_points))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::skia::mojom::SkHdrAgtmComponentMixingFunction::DataView, ::skia::mojom::SkHdrAgtmComponentMixingFunctionPtr>::Read(
    ::skia::mojom::SkHdrAgtmComponentMixingFunction::DataView input,
    ::skia::mojom::SkHdrAgtmComponentMixingFunctionPtr* output) {
  bool success = true;
  ::skia::mojom::SkHdrAgtmComponentMixingFunctionPtr result(::skia::mojom::SkHdrAgtmComponentMixingFunction::New());
  
      if (success)
        result->red = input.red();
      if (success)
        result->green = input.green();
      if (success)
        result->blue = input.blue();
      if (success)
        result->max = input.max();
      if (success)
        result->min = input.min();
      if (success)
        result->component = input.component();
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::skia::mojom::SkHdrAgtmColorGainFunction::DataView, ::skia::mojom::SkHdrAgtmColorGainFunctionPtr>::Read(
    ::skia::mojom::SkHdrAgtmColorGainFunction::DataView input,
    ::skia::mojom::SkHdrAgtmColorGainFunctionPtr* output) {
  bool success = true;
  ::skia::mojom::SkHdrAgtmColorGainFunctionPtr result(::skia::mojom::SkHdrAgtmColorGainFunction::New());
  
      if (success && !input.ReadComponentMixing(&result->component_mixing))
        success = false;
      if (success && !input.ReadGainCurve(&result->gain_curve))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::skia::mojom::SkHdrAgtmAlternateImage::DataView, ::skia::mojom::SkHdrAgtmAlternateImagePtr>::Read(
    ::skia::mojom::SkHdrAgtmAlternateImage::DataView input,
    ::skia::mojom::SkHdrAgtmAlternateImagePtr* output) {
  bool success = true;
  ::skia::mojom::SkHdrAgtmAlternateImagePtr result(::skia::mojom::SkHdrAgtmAlternateImage::New());
  
      if (success)
        result->hdr_headroom = input.hdr_headroom();
      if (success && !input.ReadColorGainFunction(&result->color_gain_function))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::skia::mojom::SkHdrAgtmHeadroomAdaptiveToneMap::DataView, ::skia::mojom::SkHdrAgtmHeadroomAdaptiveToneMapPtr>::Read(
    ::skia::mojom::SkHdrAgtmHeadroomAdaptiveToneMap::DataView input,
    ::skia::mojom::SkHdrAgtmHeadroomAdaptiveToneMapPtr* output) {
  bool success = true;
  ::skia::mojom::SkHdrAgtmHeadroomAdaptiveToneMapPtr result(::skia::mojom::SkHdrAgtmHeadroomAdaptiveToneMap::New());
  
      if (success)
        result->baseline_hdr_headroom = input.baseline_hdr_headroom();
      if (success && !input.ReadGainApplicationSpacePrimaries(&result->gain_application_space_primaries))
        success = false;
      if (success && !input.ReadAlternateImages(&result->alternate_images))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::skia::mojom::SkHdrAdaptiveGlobalToneMap::DataView, ::skia::mojom::SkHdrAdaptiveGlobalToneMapPtr>::Read(
    ::skia::mojom::SkHdrAdaptiveGlobalToneMap::DataView input,
    ::skia::mojom::SkHdrAdaptiveGlobalToneMapPtr* output) {
  bool success = true;
  ::skia::mojom::SkHdrAdaptiveGlobalToneMapPtr result(::skia::mojom::SkHdrAdaptiveGlobalToneMap::New());
  
      if (success)
        result->hdr_reference_white = input.hdr_reference_white();
      if (success && !input.ReadHeadroomAdaptiveToneMap(&result->headroom_adaptive_tone_map))
        success = false;
  *output = std::move(result);
  return success;
}

}  // namespace mojo


// Symbols declared in the -test-utils.h header are defined here instead of a
// separate .cc file to save compile time.


namespace skia::mojom {




}  // skia::mojom


#if defined(__clang__)
#pragma clang diagnostic pop
#endif