1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_
6 #define COMPONENTS_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_
8 #include "components/gpu/public/interfaces/command_buffer.mojom.h"
9 #include "gpu/command_buffer/common/capabilities.h"
10 #include "gpu/command_buffer/common/command_buffer.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/type_converter.h"
15 class CommandBufferState
;
18 struct TypeConverter
<CommandBufferStatePtr
, gpu::CommandBuffer::State
> {
19 static CommandBufferStatePtr
Convert(const gpu::CommandBuffer::State
& input
);
23 struct TypeConverter
<gpu::CommandBuffer::State
, CommandBufferStatePtr
> {
24 static gpu::CommandBuffer::State
Convert(const CommandBufferStatePtr
& input
);
28 struct TypeConverter
<GpuShaderPrecisionPtr
,
29 gpu::Capabilities::ShaderPrecision
> {
30 static GpuShaderPrecisionPtr
Convert(
31 const gpu::Capabilities::ShaderPrecision
& input
);
35 struct TypeConverter
<gpu::Capabilities::ShaderPrecision
,
36 GpuShaderPrecisionPtr
> {
37 static gpu::Capabilities::ShaderPrecision
Convert(
38 const GpuShaderPrecisionPtr
& input
);
42 struct TypeConverter
<GpuPerStagePrecisionsPtr
,
43 gpu::Capabilities::PerStagePrecisions
> {
44 static GpuPerStagePrecisionsPtr
Convert(
45 const gpu::Capabilities::PerStagePrecisions
& input
);
49 struct TypeConverter
<gpu::Capabilities::PerStagePrecisions
,
50 GpuPerStagePrecisionsPtr
> {
51 static gpu::Capabilities::PerStagePrecisions
Convert(
52 const GpuPerStagePrecisionsPtr
& input
);
56 struct TypeConverter
<GpuCapabilitiesPtr
, gpu::Capabilities
> {
57 static GpuCapabilitiesPtr
Convert(const gpu::Capabilities
& input
);
61 struct TypeConverter
<gpu::Capabilities
, GpuCapabilitiesPtr
> {
62 static gpu::Capabilities
Convert(const GpuCapabilitiesPtr
& input
);
67 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_