| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GRAPHICS_3D_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 scoped_ptr<gpu::CommandBuffer> command_buffer_; | 54 scoped_ptr<gpu::CommandBuffer> command_buffer_; |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(Graphics3D); | 56 DISALLOW_COPY_AND_ASSIGN(Graphics3D); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 class PPB_Graphics3D_Proxy : public InterfaceProxy { | 59 class PPB_Graphics3D_Proxy : public InterfaceProxy { |
| 60 public: | 60 public: |
| 61 PPB_Graphics3D_Proxy(Dispatcher* dispatcher); | 61 PPB_Graphics3D_Proxy(Dispatcher* dispatcher); |
| 62 virtual ~PPB_Graphics3D_Proxy(); | 62 virtual ~PPB_Graphics3D_Proxy(); |
| 63 | 63 |
| 64 static PP_Resource CreateProxyResource(PP_Instance instance, | 64 static PP_Resource CreateProxyResource( |
| 65 PP_Resource share_context, | 65 PP_Instance instance, |
| 66 const int32_t* attrib_list); | 66 thunk::PPB_Graphics3D_API* share_context, |
| 67 const int32_t* attrib_list); |
| 67 | 68 |
| 68 // InterfaceProxy implementation. | 69 // InterfaceProxy implementation. |
| 69 virtual bool OnMessageReceived(const IPC::Message& msg); | 70 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 70 | 71 |
| 71 static const ApiID kApiID = API_ID_PPB_GRAPHICS_3D; | 72 static const ApiID kApiID = API_ID_PPB_GRAPHICS_3D; |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 void OnMsgCreate(PP_Instance instance, | 75 void OnMsgCreate(PP_Instance instance, |
| 76 HostResource share_context, |
| 75 const std::vector<int32_t>& attribs, | 77 const std::vector<int32_t>& attribs, |
| 76 HostResource* result); | 78 HostResource* result); |
| 77 void OnMsgInitCommandBuffer(const HostResource& context); | 79 void OnMsgInitCommandBuffer(const HostResource& context); |
| 78 void OnMsgSetGetBuffer(const HostResource& context, | 80 void OnMsgSetGetBuffer(const HostResource& context, |
| 79 int32 id); | 81 int32 id); |
| 80 void OnMsgGetState(const HostResource& context, | 82 void OnMsgGetState(const HostResource& context, |
| 81 gpu::CommandBuffer::State* state); | 83 gpu::CommandBuffer::State* state); |
| 82 void OnMsgFlush(const HostResource& context, | 84 void OnMsgFlush(const HostResource& context, |
| 83 int32 put_offset, | 85 int32 put_offset, |
| 84 int32 last_known_get, | 86 int32 last_known_get, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 106 ProxyNonThreadSafeRefCount> callback_factory_; | 108 ProxyNonThreadSafeRefCount> callback_factory_; |
| 107 | 109 |
| 108 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); | 110 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); |
| 109 }; | 111 }; |
| 110 | 112 |
| 111 } // namespace proxy | 113 } // namespace proxy |
| 112 } // namespace ppapi | 114 } // namespace ppapi |
| 113 | 115 |
| 114 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ | 116 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ |
| 115 | 117 |
| OLD | NEW |