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_GLES2_GLES2_CONTEXT_H_ | 5 #ifndef MOJO_GLES2_GLES2_CONTEXT_H_ |
6 #define MOJO_GLES2_GLES2_CONTEXT_H_ | 6 #define MOJO_GLES2_GLES2_CONTEXT_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "gpu/command_buffer/client/gles2_implementation.h" | 10 #include "gpu/command_buffer/client/gles2_implementation.h" |
11 #include "mojo/gles2/command_buffer_client_impl.h" | 11 #include "mojo/gles2/command_buffer_client_impl.h" |
12 #include "mojo/public/c/gles2/gles2.h" | 12 #include "mojo/public/c/gles2/gles2.h" |
13 #include "mojo/public/cpp/bindings/remote_ptr.h" | |
14 | 13 |
15 struct MojoGLES2ContextPrivate {}; | 14 struct MojoGLES2ContextPrivate {}; |
16 | 15 |
17 namespace gpu { | 16 namespace gpu { |
18 class TransferBuffer; | 17 class TransferBuffer; |
19 namespace gles2 { | 18 namespace gles2 { |
20 class GLES2CmdHelper; | 19 class GLES2CmdHelper; |
21 class GLES2Implementation; | 20 class GLES2Implementation; |
22 } | 21 } |
23 } | 22 } |
24 | 23 |
25 namespace mojo { | 24 namespace mojo { |
26 namespace gles2 { | 25 namespace gles2 { |
27 | 26 |
28 class GLES2Context : public CommandBufferDelegate, | 27 class GLES2Context : public CommandBufferDelegate, |
29 public MojoGLES2ContextPrivate { | 28 public MojoGLES2ContextPrivate { |
30 public: | 29 public: |
31 explicit GLES2Context(MojoAsyncWaiter* async_waiter, | 30 explicit GLES2Context(MojoAsyncWaiter* async_waiter, |
32 ScopedCommandBufferHandle command_buffer_handle, | 31 ScopedMessagePipeHandle command_buffer_handle, |
33 MojoGLES2ContextLost lost_callback, | 32 MojoGLES2ContextLost lost_callback, |
34 MojoGLES2DrawAnimationFrame animation_callback, | 33 MojoGLES2DrawAnimationFrame animation_callback, |
35 void* closure); | 34 void* closure); |
36 virtual ~GLES2Context(); | 35 virtual ~GLES2Context(); |
37 bool Initialize(); | 36 bool Initialize(); |
38 | 37 |
39 gpu::gles2::GLES2Interface* interface() const { | 38 gpu::gles2::GLES2Interface* interface() const { |
40 return implementation_.get(); | 39 return implementation_.get(); |
41 } | 40 } |
42 gpu::ContextSupport* context_support() const { return implementation_.get(); } | 41 gpu::ContextSupport* context_support() const { return implementation_.get(); } |
(...skipping 12 matching lines...) Expand all Loading... |
55 MojoGLES2DrawAnimationFrame animation_callback_; | 54 MojoGLES2DrawAnimationFrame animation_callback_; |
56 void* closure_; | 55 void* closure_; |
57 | 56 |
58 MOJO_DISALLOW_COPY_AND_ASSIGN(GLES2Context); | 57 MOJO_DISALLOW_COPY_AND_ASSIGN(GLES2Context); |
59 }; | 58 }; |
60 | 59 |
61 } // namespace gles2 | 60 } // namespace gles2 |
62 } // namespace mojo | 61 } // namespace mojo |
63 | 62 |
64 #endif // MOJO_GLES2_GLES2_CONTEXT_H_ | 63 #endif // MOJO_GLES2_GLES2_CONTEXT_H_ |
OLD | NEW |