chromium/gpu/ipc/common/gpu_preferences_mojom_traits.h

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

#ifndef GPU_IPC_COMMON_GPU_PREFERENCES_MOJOM_TRAITS_H_
#define GPU_IPC_COMMON_GPU_PREFERENCES_MOJOM_TRAITS_H_

#include <vector>

#include "base/notreached.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "gpu/config/gpu_preferences.h"
#include "gpu/gpu_export.h"
#include "gpu/ipc/common/gpu_preferences.mojom-shared.h"

#if BUILDFLAG(IS_OZONE)
#include "base/message_loop/message_pump_type.h"
#include "mojo/public/cpp/base/message_pump_type_mojom_traits.h"
#endif

namespace mojo {

template <>
struct GPU_EXPORT EnumTraits<gpu::mojom::GrContextType, gpu::GrContextType> {};

template <>
struct GPU_EXPORT EnumTraits<gpu::mojom::VulkanImplementationName,
                             gpu::VulkanImplementationName> {};

template <>
struct GPU_EXPORT
    EnumTraits<gpu::mojom::WebGPUAdapterName, gpu::WebGPUAdapterName> {};

template <>
struct GPU_EXPORT
    EnumTraits<gpu::mojom::WebGPUPowerPreference, gpu::WebGPUPowerPreference> {};

template <>
struct GPU_EXPORT EnumTraits<gpu::mojom::DawnBackendValidationLevel,
                             gpu::DawnBackendValidationLevel> {};

template <>
struct GPU_EXPORT
    StructTraits<gpu::mojom::GpuPreferencesDataView, gpu::GpuPreferences> {};

}  // namespace mojo

#endif  // GPU_IPC_COMMON_GPU_PREFERENCES_MOJOM_TRAITS_H_