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" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 scoped_ptr<gpu::CommandBuffer> command_buffer_; | 87 scoped_ptr<gpu::CommandBuffer> command_buffer_; |
88 scoped_ptr<gpu::gles2::GLES2CmdHelper> helper_; | 88 scoped_ptr<gpu::gles2::GLES2CmdHelper> helper_; |
89 int32 transfer_buffer_id_; | 89 int32 transfer_buffer_id_; |
90 scoped_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; | 90 scoped_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(Context3D); | 92 DISALLOW_COPY_AND_ASSIGN(Context3D); |
93 }; | 93 }; |
94 | 94 |
95 class PPB_Context3D_Proxy : public InterfaceProxy { | 95 class PPB_Context3D_Proxy : public InterfaceProxy { |
96 public: | 96 public: |
97 PPB_Context3D_Proxy(Dispatcher* dispatcher, const void* target_interface); | 97 PPB_Context3D_Proxy(Dispatcher* dispatcher); |
98 virtual ~PPB_Context3D_Proxy(); | 98 virtual ~PPB_Context3D_Proxy(); |
99 | 99 |
100 static const Info* GetInfo(); | |
101 static const Info* GetTextureMappingInfo(); | |
102 | |
103 static PP_Resource Create(PP_Instance instance, | 100 static PP_Resource Create(PP_Instance instance, |
104 PP_Config3D_Dev config, | 101 PP_Config3D_Dev config, |
105 PP_Resource share_context, | 102 PP_Resource share_context, |
106 const int32_t* attrib_list); | 103 const int32_t* attrib_list); |
107 | 104 |
108 // InterfaceProxy implementation. | 105 // InterfaceProxy implementation. |
109 virtual bool OnMessageReceived(const IPC::Message& msg); | 106 virtual bool OnMessageReceived(const IPC::Message& msg); |
110 | 107 |
| 108 static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_CONTEXT_3D; |
| 109 |
111 private: | 110 private: |
112 void OnMsgCreate(PP_Instance instance, | 111 void OnMsgCreate(PP_Instance instance, |
113 PP_Config3D_Dev config, | 112 PP_Config3D_Dev config, |
114 const std::vector<int32_t>& attribs, | 113 const std::vector<int32_t>& attribs, |
115 HostResource* result); | 114 HostResource* result); |
116 void OnMsgBindSurfaces(const HostResource& context, | 115 void OnMsgBindSurfaces(const HostResource& context, |
117 const HostResource& draw, | 116 const HostResource& draw, |
118 const HostResource& read, | 117 const HostResource& read, |
119 int32_t* result); | 118 int32_t* result); |
120 void OnMsgInitialize(const HostResource& context, | 119 void OnMsgInitialize(const HostResource& context, |
(...skipping 15 matching lines...) Expand all Loading... |
136 void OnMsgGetTransferBuffer(const HostResource& context, | 135 void OnMsgGetTransferBuffer(const HostResource& context, |
137 int32 id, | 136 int32 id, |
138 base::SharedMemoryHandle* transfer_buffer, | 137 base::SharedMemoryHandle* transfer_buffer, |
139 uint32* size); | 138 uint32* size); |
140 }; | 139 }; |
141 | 140 |
142 } // namespace proxy | 141 } // namespace proxy |
143 } // namespace ppapi | 142 } // namespace ppapi |
144 | 143 |
145 #endif // PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ | 144 #endif // PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ |
OLD | NEW |