Index: mojo/services/gles2/command_buffer_type_conversions.h |
diff --git a/mojo/services/gles2/command_buffer_type_conversions.h b/mojo/services/gles2/command_buffer_type_conversions.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9243a56349beff4782e981a8185cd762f6a43c6a |
--- /dev/null |
+++ b/mojo/services/gles2/command_buffer_type_conversions.h |
@@ -0,0 +1,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 SERVICES_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_ |
+#define SERVICES_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_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" |
+#include "third_party/mojo_services/src/gpu/public/interfaces/command_buffer.mojom.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 gles2 |
+ |
+#endif // SERVICES_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_ |