OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #ifndef COMPONENTS_VIEW_MANAGER_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_ | |
6 #define COMPONENTS_VIEW_MANAGER_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_ | |
7 | |
8 #include "components/view_manager/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" | |
12 | |
13 namespace mojo { | |
14 | |
15 class CommandBufferState; | |
16 | |
17 template <> | |
18 struct TypeConverter<CommandBufferStatePtr, gpu::CommandBuffer::State> { | |
19 static CommandBufferStatePtr Convert(const gpu::CommandBuffer::State& input); | |
20 }; | |
21 | |
22 template <> | |
23 struct TypeConverter<gpu::CommandBuffer::State, CommandBufferStatePtr> { | |
24 static gpu::CommandBuffer::State Convert(const CommandBufferStatePtr& input); | |
25 }; | |
26 | |
27 template <> | |
28 struct TypeConverter<GpuShaderPrecisionPtr, | |
29 gpu::Capabilities::ShaderPrecision> { | |
30 static GpuShaderPrecisionPtr Convert( | |
31 const gpu::Capabilities::ShaderPrecision& input); | |
32 }; | |
33 | |
34 template <> | |
35 struct TypeConverter<gpu::Capabilities::ShaderPrecision, | |
36 GpuShaderPrecisionPtr> { | |
37 static gpu::Capabilities::ShaderPrecision Convert( | |
38 const GpuShaderPrecisionPtr& input); | |
39 }; | |
40 | |
41 template <> | |
42 struct TypeConverter<GpuPerStagePrecisionsPtr, | |
43 gpu::Capabilities::PerStagePrecisions> { | |
44 static GpuPerStagePrecisionsPtr Convert( | |
45 const gpu::Capabilities::PerStagePrecisions& input); | |
46 }; | |
47 | |
48 template <> | |
49 struct TypeConverter<gpu::Capabilities::PerStagePrecisions, | |
50 GpuPerStagePrecisionsPtr> { | |
51 static gpu::Capabilities::PerStagePrecisions Convert( | |
52 const GpuPerStagePrecisionsPtr& input); | |
53 }; | |
54 | |
55 template <> | |
56 struct TypeConverter<GpuCapabilitiesPtr, gpu::Capabilities> { | |
57 static GpuCapabilitiesPtr Convert(const gpu::Capabilities& input); | |
58 }; | |
59 | |
60 template <> | |
61 struct TypeConverter<gpu::Capabilities, GpuCapabilitiesPtr> { | |
62 static gpu::Capabilities Convert(const GpuCapabilitiesPtr& input); | |
63 }; | |
64 | |
65 } // namespace gles2 | |
66 | |
67 #endif // COMPONENTS_VIEW_MANAGER_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_ | |
OLD | NEW |