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 "gpu/command_buffer/common/command_buffer.h" | 10 #include "gpu/command_buffer/common/command_buffer.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 class SerializedHandle; | 30 class SerializedHandle; |
31 class PpapiCommandBufferProxy; | 31 class PpapiCommandBufferProxy; |
32 | 32 |
33 class PPAPI_PROXY_EXPORT Graphics3D : public PPB_Graphics3D_Shared { | 33 class PPAPI_PROXY_EXPORT Graphics3D : public PPB_Graphics3D_Shared { |
34 public: | 34 public: |
35 explicit Graphics3D(const HostResource& resource); | 35 explicit Graphics3D(const HostResource& resource); |
36 ~Graphics3D() override; | 36 ~Graphics3D() override; |
37 | 37 |
38 bool Init(gpu::gles2::GLES2Implementation* share_gles2, | 38 bool Init(gpu::gles2::GLES2Implementation* share_gles2, |
39 const gpu::Capabilities& capabilities, | 39 const gpu::Capabilities& capabilities, |
40 const SerializedHandle& shared_state); | 40 const SerializedHandle& shared_state, |
| 41 uint64_t command_buffer_id); |
41 | 42 |
42 // Graphics3DTrusted API. These are not implemented in the proxy. | 43 // Graphics3DTrusted API. These are not implemented in the proxy. |
43 PP_Bool SetGetBuffer(int32_t shm_id) override; | 44 PP_Bool SetGetBuffer(int32_t shm_id) override; |
44 PP_Bool Flush(int32_t put_offset) override; | 45 PP_Bool Flush(int32_t put_offset) override; |
45 scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size, | 46 scoped_refptr<gpu::Buffer> CreateTransferBuffer(uint32_t size, |
46 int32* id) override; | 47 int32* id) override; |
47 PP_Bool DestroyTransferBuffer(int32_t id) override; | 48 PP_Bool DestroyTransferBuffer(int32_t id) override; |
48 gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, | 49 gpu::CommandBuffer::State WaitForTokenInRange(int32_t start, |
49 int32_t end) override; | 50 int32_t end) override; |
50 gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start, | 51 gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start, |
(...skipping 27 matching lines...) Expand all Loading... |
78 bool OnMessageReceived(const IPC::Message& msg) override; | 79 bool OnMessageReceived(const IPC::Message& msg) override; |
79 | 80 |
80 static const ApiID kApiID = API_ID_PPB_GRAPHICS_3D; | 81 static const ApiID kApiID = API_ID_PPB_GRAPHICS_3D; |
81 | 82 |
82 private: | 83 private: |
83 void OnMsgCreate(PP_Instance instance, | 84 void OnMsgCreate(PP_Instance instance, |
84 HostResource share_context, | 85 HostResource share_context, |
85 const std::vector<int32_t>& attribs, | 86 const std::vector<int32_t>& attribs, |
86 HostResource* result, | 87 HostResource* result, |
87 gpu::Capabilities* capabilities, | 88 gpu::Capabilities* capabilities, |
88 SerializedHandle* handle); | 89 SerializedHandle* handle, |
| 90 uint64_t* command_buffer_id); |
89 void OnMsgSetGetBuffer(const HostResource& context, | 91 void OnMsgSetGetBuffer(const HostResource& context, |
90 int32 id); | 92 int32 id); |
91 void OnMsgWaitForTokenInRange(const HostResource& context, | 93 void OnMsgWaitForTokenInRange(const HostResource& context, |
92 int32 start, | 94 int32 start, |
93 int32 end, | 95 int32 end, |
94 gpu::CommandBuffer::State* state, | 96 gpu::CommandBuffer::State* state, |
95 bool* success); | 97 bool* success); |
96 void OnMsgWaitForGetOffsetInRange(const HostResource& context, | 98 void OnMsgWaitForGetOffsetInRange(const HostResource& context, |
97 int32 start, | 99 int32 start, |
98 int32 end, | 100 int32 end, |
(...skipping 22 matching lines...) Expand all Loading... |
121 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; | 123 ProxyCompletionCallbackFactory<PPB_Graphics3D_Proxy> callback_factory_; |
122 | 124 |
123 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); | 125 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); |
124 }; | 126 }; |
125 | 127 |
126 } // namespace proxy | 128 } // namespace proxy |
127 } // namespace ppapi | 129 } // namespace ppapi |
128 | 130 |
129 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ | 131 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ |
130 | 132 |
OLD | NEW |