chromium/ui/gfx/mojom/color_space_mojom_traits.h

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

#ifndef UI_GFX_MOJOM_COLOR_SPACE_MOJOM_TRAITS_H_
#define UI_GFX_MOJOM_COLOR_SPACE_MOJOM_TRAITS_H_

#include "base/component_export.h"
#include "base/containers/span.h"
#include "base/notreached.h"
#include "ui/gfx/color_space.h"
#include "ui/gfx/mojom/color_space.mojom-shared.h"

namespace mojo {

template <>
struct EnumTraits<gfx::mojom::ColorSpacePrimaryID, gfx::ColorSpace::PrimaryID> {};

template <>
struct EnumTraits<gfx::mojom::ColorSpaceTransferID,
                  gfx::ColorSpace::TransferID> {};

template <>
struct EnumTraits<gfx::mojom::ColorSpaceMatrixID, gfx::ColorSpace::MatrixID> {};

template <>
struct EnumTraits<gfx::mojom::ColorSpaceRangeID, gfx::ColorSpace::RangeID> {};

template <>
struct COMPONENT_EXPORT(GFX_SHARED_MOJOM_TRAITS)
    StructTraits<gfx::mojom::ColorSpaceDataView, gfx::ColorSpace> {};

}  // namespace mojo

#endif  // UI_GFX_MOJOM_COLOR_SPACE_MOJOM_TRAITS_H_