summaryrefslogtreecommitdiffstats
path: root/components/mus/gles2/command_buffer_type_conversions.h
blob: 2055c4b3bfe759380299111ba804fd92c7e3ada5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_MUS_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_
#define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_

#include "components/mus/public/interfaces/command_buffer.mojom.h"
#include "gpu/command_buffer/common/capabilities.h"
#include "gpu/command_buffer/common/command_buffer.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/type_converter.h"

namespace mojo {

class CommandBufferState;

template <>
struct TypeConverter<CommandBufferStatePtr, gpu::CommandBuffer::State> {
  static CommandBufferStatePtr Convert(const gpu::CommandBuffer::State& input);
};

template <>
struct TypeConverter<gpu::CommandBuffer::State, CommandBufferStatePtr> {
  static gpu::CommandBuffer::State Convert(const CommandBufferStatePtr& input);
};

template <>
struct TypeConverter<GpuShaderPrecisionPtr,
                     gpu::Capabilities::ShaderPrecision> {
  static GpuShaderPrecisionPtr Convert(
      const gpu::Capabilities::ShaderPrecision& input);
};

template <>
struct TypeConverter<gpu::Capabilities::ShaderPrecision,
                     GpuShaderPrecisionPtr> {
  static gpu::Capabilities::ShaderPrecision Convert(
      const GpuShaderPrecisionPtr& input);
};

template <>
struct TypeConverter<GpuPerStagePrecisionsPtr,
                     gpu::Capabilities::PerStagePrecisions> {
  static GpuPerStagePrecisionsPtr Convert(
      const gpu::Capabilities::PerStagePrecisions& input);
};

template <>
struct TypeConverter<gpu::Capabilities::PerStagePrecisions,
                     GpuPerStagePrecisionsPtr> {
  static gpu::Capabilities::PerStagePrecisions Convert(
      const GpuPerStagePrecisionsPtr& input);
};

template <>
struct TypeConverter<GpuCapabilitiesPtr, gpu::Capabilities> {
  static GpuCapabilitiesPtr Convert(const gpu::Capabilities& input);
};

template <>
struct TypeConverter<gpu::Capabilities, GpuCapabilitiesPtr> {
  static gpu::Capabilities Convert(const GpuCapabilitiesPtr& input);
};

}  // namespace mojo

#endif  // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_