OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_EXAMPLES_COMPOSITOR_APP_GLES2_CLIENT_IMPL_H_ | 5 #ifndef MOJO_EXAMPLES_COMPOSITOR_APP_GLES2_CLIENT_IMPL_H_ |
6 #define MOJO_EXAMPLES_COMPOSITOR_APP_GLES2_CLIENT_IMPL_H_ | 6 #define MOJO_EXAMPLES_COMPOSITOR_APP_GLES2_CLIENT_IMPL_H_ |
7 | 7 |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
10 #include "mojo/public/bindings/lib/remote_ptr.h" | 10 #include "mojo/public/bindings/lib/remote_ptr.h" |
11 #include "mojom/gles2.h" | 11 #include "mojom/gles2.h" |
12 #include "mojom/native_viewport.h" | 12 #include "mojom/native_viewport.h" |
13 #include "ui/gfx/size.h" | 13 #include "ui/gfx/size.h" |
14 | 14 |
15 namespace gpu { | 15 namespace gpu { |
16 class ContextSupport; | 16 class ContextSupport; |
17 namespace gles2 { | 17 namespace gles2 { |
18 class GLES2Interface; | 18 class GLES2Interface; |
19 class GLES2Implementation; | 19 class GLES2Implementation; |
20 } | 20 } |
21 } | 21 } |
22 | 22 |
23 namespace mojo { | 23 namespace mojo { |
24 namespace examples { | 24 namespace examples { |
25 | 25 |
26 class GLES2ClientImpl : public GLES2ClientStub { | 26 class GLES2ClientImpl : public GLES2Client { |
27 public: | 27 public: |
28 GLES2ClientImpl( | 28 GLES2ClientImpl( |
29 ScopedMessagePipeHandle pipe, | 29 ScopedMessagePipeHandle pipe, |
30 const base::Callback<void(gfx::Size)>& context_created_callback); | 30 const base::Callback<void(gfx::Size)>& context_created_callback); |
31 virtual ~GLES2ClientImpl(); | 31 virtual ~GLES2ClientImpl(); |
32 | 32 |
33 gpu::gles2::GLES2Interface* Interface() const; | 33 gpu::gles2::GLES2Interface* Interface() const; |
34 gpu::ContextSupport* Support() const; | 34 gpu::ContextSupport* Support() const; |
35 | 35 |
36 private: | 36 private: |
37 virtual void DidCreateContext(uint64_t encoded, | 37 virtual void DidCreateContext(uint64_t encoded, |
38 uint32_t width, | 38 uint32_t width, |
39 uint32_t height) MOJO_OVERRIDE; | 39 uint32_t height) MOJO_OVERRIDE; |
40 virtual void ContextLost() MOJO_OVERRIDE; | 40 virtual void ContextLost() MOJO_OVERRIDE; |
41 | 41 |
42 base::Callback<void(gfx::Size viewport_size)> context_created_callback_; | 42 base::Callback<void(gfx::Size viewport_size)> context_created_callback_; |
43 gpu::gles2::GLES2Implementation* impl_; | 43 gpu::gles2::GLES2Implementation* impl_; |
44 | 44 |
45 RemotePtr<GLES2> service_; | 45 RemotePtr<GLES2> service_; |
46 | 46 |
47 MOJO_DISALLOW_COPY_AND_ASSIGN(GLES2ClientImpl); | 47 MOJO_DISALLOW_COPY_AND_ASSIGN(GLES2ClientImpl); |
48 }; | 48 }; |
49 | 49 |
50 } // namespace examples | 50 } // namespace examples |
51 } // namespace mojo | 51 } // namespace mojo |
52 | 52 |
53 #endif // MOJO_EXAMPLES_COMPOSITOR_APP_GLES2_CLIENT_IMPL_H_ | 53 #endif // MOJO_EXAMPLES_COMPOSITOR_APP_GLES2_CLIENT_IMPL_H_ |
OLD | NEW |