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 "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
9 #include "gpu/command_buffer/common/command_buffer.h" | 9 #include "gpu/command_buffer/common/command_buffer.h" |
10 #include "mojo/public/bindings/type_converter.h" | 10 #include "mojo/public/cpp/bindings/type_converter.h" |
11 | 11 |
12 namespace mojo { | 12 namespace mojo { |
13 | 13 |
14 class ShmHandle; | 14 class ShmHandle; |
15 class CommandBufferState; | 15 class CommandBufferState; |
16 class Buffer; | 16 class Buffer; |
17 | 17 |
18 template <> | 18 template <> |
19 class TypeConverter<ShmHandle, base::SharedMemoryHandle> { | 19 class TypeConverter<ShmHandle, base::SharedMemoryHandle> { |
20 public: | 20 public: |
21 static ShmHandle ConvertFrom(const base::SharedMemoryHandle& input, | 21 static ShmHandle ConvertFrom(const base::SharedMemoryHandle& input, |
22 Buffer* buffer); | 22 Buffer* buffer); |
23 static base::SharedMemoryHandle ConvertTo(const ShmHandle& input); | 23 static base::SharedMemoryHandle ConvertTo(const ShmHandle& input); |
24 }; | 24 }; |
25 | 25 |
26 template <> | 26 template <> |
27 class TypeConverter<CommandBufferState, gpu::CommandBuffer::State> { | 27 class TypeConverter<CommandBufferState, gpu::CommandBuffer::State> { |
28 public: | 28 public: |
29 static CommandBufferState ConvertFrom(const gpu::CommandBuffer::State& input, | 29 static CommandBufferState ConvertFrom(const gpu::CommandBuffer::State& input, |
30 Buffer* buffer); | 30 Buffer* buffer); |
31 static gpu::CommandBuffer::State ConvertTo(const CommandBufferState& input); | 31 static gpu::CommandBuffer::State ConvertTo(const CommandBufferState& input); |
32 }; | 32 }; |
33 | 33 |
34 } // namespace mojo | 34 } // namespace mojo |
35 | 35 |
36 #endif // MOJO_SERVICES_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_ | 36 #endif // MOJO_SERVICES_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_ |
OLD | NEW |