OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ |
6 #define PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
12 #include "gpu/command_buffer/common/command_buffer.h" | 12 #include "gpu/command_buffer/common/command_buffer.h" |
13 #include "ppapi/c/pp_graphics_3d.h" | 13 #include "ppapi/c/pp_graphics_3d.h" |
14 #include "ppapi/c/pp_instance.h" | 14 #include "ppapi/c/pp_instance.h" |
15 #include "ppapi/proxy/interface_proxy.h" | 15 #include "ppapi/proxy/interface_proxy.h" |
16 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" | 16 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" |
17 #include "ppapi/shared_impl/resource.h" | 17 #include "ppapi/shared_impl/resource.h" |
18 #include "ppapi/thunk/ppb_context_3d_api.h" | 18 #include "ppapi/thunk/ppb_context_3d_api.h" |
19 | 19 |
20 struct PPB_Context3D_Dev; | |
21 struct PPB_Context3DTrusted_Dev; | |
22 | |
23 namespace gpu { | 20 namespace gpu { |
24 class CommandBuffer; | 21 class CommandBuffer; |
25 | 22 |
26 namespace gles2 { | 23 namespace gles2 { |
27 class GLES2CmdHelper; | 24 class GLES2CmdHelper; |
28 class GLES2Implementation; | 25 class GLES2Implementation; |
29 } // namespace gles2 | 26 } // namespace gles2 |
30 | 27 |
31 } // namespace gpu | 28 } // namespace gpu |
32 | 29 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 scoped_ptr<gpu::CommandBuffer> command_buffer_; | 84 scoped_ptr<gpu::CommandBuffer> command_buffer_; |
88 scoped_ptr<gpu::gles2::GLES2CmdHelper> helper_; | 85 scoped_ptr<gpu::gles2::GLES2CmdHelper> helper_; |
89 int32 transfer_buffer_id_; | 86 int32 transfer_buffer_id_; |
90 scoped_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; | 87 scoped_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; |
91 | 88 |
92 DISALLOW_COPY_AND_ASSIGN(Context3D); | 89 DISALLOW_COPY_AND_ASSIGN(Context3D); |
93 }; | 90 }; |
94 | 91 |
95 class PPB_Context3D_Proxy : public InterfaceProxy { | 92 class PPB_Context3D_Proxy : public InterfaceProxy { |
96 public: | 93 public: |
97 PPB_Context3D_Proxy(Dispatcher* dispatcher); | 94 explicit PPB_Context3D_Proxy(Dispatcher* dispatcher); |
98 virtual ~PPB_Context3D_Proxy(); | 95 virtual ~PPB_Context3D_Proxy(); |
99 | 96 |
100 static PP_Resource Create(PP_Instance instance, | 97 static PP_Resource Create(PP_Instance instance, |
101 PP_Config3D_Dev config, | 98 PP_Config3D_Dev config, |
102 PP_Resource share_context, | 99 PP_Resource share_context, |
103 const int32_t* attrib_list); | 100 const int32_t* attrib_list); |
104 | 101 |
105 // InterfaceProxy implementation. | 102 // InterfaceProxy implementation. |
106 virtual bool OnMessageReceived(const IPC::Message& msg); | 103 virtual bool OnMessageReceived(const IPC::Message& msg); |
107 | 104 |
(...skipping 27 matching lines...) Expand all Loading... |
135 void OnMsgGetTransferBuffer(const HostResource& context, | 132 void OnMsgGetTransferBuffer(const HostResource& context, |
136 int32 id, | 133 int32 id, |
137 base::SharedMemoryHandle* transfer_buffer, | 134 base::SharedMemoryHandle* transfer_buffer, |
138 uint32* size); | 135 uint32* size); |
139 }; | 136 }; |
140 | 137 |
141 } // namespace proxy | 138 } // namespace proxy |
142 } // namespace ppapi | 139 } // namespace ppapi |
143 | 140 |
144 #endif // PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ | 141 #endif // PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ |
OLD | NEW |