OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_SERVICES_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_ | 5 #ifndef MOJO_SERVICES_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_ |
6 #define MOJO_SERVICES_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_ | 6 #define MOJO_SERVICES_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_ |
7 | 7 |
8 #include "gpu/command_buffer/common/command_buffer.h" | 8 #include "gpu/command_buffer/common/command_buffer.h" |
9 #include "mojo/public/cpp/bindings/type_converter.h" | 9 #include "mojo/public/cpp/bindings/type_converter.h" |
| 10 #include "mojo/services/gles2/command_buffer.mojom.h" |
10 | 11 |
11 namespace mojo { | 12 namespace mojo { |
12 | 13 |
13 class CommandBufferState; | 14 class CommandBufferState; |
14 class Buffer; | |
15 | 15 |
16 template <> | 16 template <> |
17 class TypeConverter<CommandBufferState, gpu::CommandBuffer::State> { | 17 class TypeConverter<CommandBufferStatePtr, gpu::CommandBuffer::State> { |
18 public: | 18 public: |
19 static CommandBufferState ConvertFrom(const gpu::CommandBuffer::State& input, | 19 static CommandBufferStatePtr ConvertFrom( |
20 Buffer* buffer); | 20 const gpu::CommandBuffer::State& input); |
21 static gpu::CommandBuffer::State ConvertTo(const CommandBufferState& input); | 21 static gpu::CommandBuffer::State ConvertTo( |
22 | 22 const CommandBufferStatePtr& input); |
23 MOJO_ALLOW_IMPLICIT_TYPE_CONVERSION(); | |
24 }; | 23 }; |
25 | 24 |
26 } // namespace mojo | 25 } // namespace mojo |
27 | 26 |
28 #endif // MOJO_SERVICES_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_ | 27 #endif // MOJO_SERVICES_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_ |
OLD | NEW |