Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: mojo/services/gles2/command_buffer_type_conversions.h

Issue 294833002: Mojo: more idiomatic C++ bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_
OLDNEW
« no previous file with comments | « mojo/services/gles2/command_buffer_impl.cc ('k') | mojo/services/gles2/command_buffer_type_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698