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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 gpu::gles2::GLES2Implementation* gles2_impl() const { | 43 gpu::gles2::GLES2Implementation* gles2_impl() const { |
44 return gles2_impl_.get(); | 44 return gles2_impl_.get(); |
45 } | 45 } |
46 | 46 |
47 // PPB_Context3D_API implementation. | 47 // PPB_Context3D_API implementation. |
48 virtual int32_t GetAttrib(int32_t attribute, int32_t* value) OVERRIDE; | 48 virtual int32_t GetAttrib(int32_t attribute, int32_t* value) OVERRIDE; |
49 virtual int32_t BindSurfaces(PP_Resource draw, PP_Resource read) OVERRIDE; | 49 virtual int32_t BindSurfaces(PP_Resource draw, PP_Resource read) OVERRIDE; |
50 virtual int32_t GetBoundSurfaces(PP_Resource* draw, | 50 virtual int32_t GetBoundSurfaces(PP_Resource* draw, |
51 PP_Resource* read) OVERRIDE; | 51 PP_Resource* read) OVERRIDE; |
52 virtual PP_Bool InitializeTrusted(int32_t size) OVERRIDE; | 52 virtual PP_Bool InitializeTrusted() OVERRIDE; |
53 virtual PP_Bool GetRingBuffer(int* shm_handle, | 53 virtual PP_Bool SetGetBuffer(int32_t shm_id) OVERRIDE; |
54 uint32_t* shm_size) OVERRIDE; | |
55 virtual PP_Context3DTrustedState GetState() OVERRIDE; | 54 virtual PP_Context3DTrustedState GetState() OVERRIDE; |
56 virtual PP_Bool Flush(int32_t put_offset) OVERRIDE; | 55 virtual PP_Bool Flush(int32_t put_offset) OVERRIDE; |
57 virtual PP_Context3DTrustedState FlushSync(int32_t put_offset) OVERRIDE; | 56 virtual PP_Context3DTrustedState FlushSync(int32_t put_offset) OVERRIDE; |
58 virtual int32_t CreateTransferBuffer(uint32_t size) OVERRIDE; | 57 virtual int32_t CreateTransferBuffer(uint32_t size) OVERRIDE; |
59 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; | 58 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; |
60 virtual PP_Bool GetTransferBuffer(int32_t id, | 59 virtual PP_Bool GetTransferBuffer(int32_t id, |
61 int* shm_handle, | 60 int* shm_handle, |
62 uint32_t* shm_size) OVERRIDE; | 61 uint32_t* shm_size) OVERRIDE; |
63 virtual PP_Context3DTrustedState FlushSyncFast( | 62 virtual PP_Context3DTrustedState FlushSyncFast( |
64 int32_t put_offset, | 63 int32_t put_offset, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 105 |
107 private: | 106 private: |
108 void OnMsgCreate(PP_Instance instance, | 107 void OnMsgCreate(PP_Instance instance, |
109 PP_Config3D_Dev config, | 108 PP_Config3D_Dev config, |
110 const std::vector<int32_t>& attribs, | 109 const std::vector<int32_t>& attribs, |
111 HostResource* result); | 110 HostResource* result); |
112 void OnMsgBindSurfaces(const HostResource& context, | 111 void OnMsgBindSurfaces(const HostResource& context, |
113 const HostResource& draw, | 112 const HostResource& draw, |
114 const HostResource& read, | 113 const HostResource& read, |
115 int32_t* result); | 114 int32_t* result); |
116 void OnMsgInitialize(const HostResource& context, | 115 void OnMsgInitialize(const HostResource& context); |
117 int32 size, | 116 void OnMsgSetGetBuffer(const HostResource& context, |
118 base::SharedMemoryHandle* ring_buffer); | 117 int32_t shm_id); |
119 void OnMsgGetState(const HostResource& context, | 118 void OnMsgGetState(const HostResource& context, |
120 gpu::CommandBuffer::State* state); | 119 gpu::CommandBuffer::State* state); |
121 void OnMsgFlush(const HostResource& context, | 120 void OnMsgFlush(const HostResource& context, |
122 int32 put_offset, | 121 int32 put_offset, |
123 int32 last_known_get, | 122 int32 last_known_get, |
124 gpu::CommandBuffer::State* state); | 123 gpu::CommandBuffer::State* state); |
125 void OnMsgAsyncFlush(const HostResource& context, | 124 void OnMsgAsyncFlush(const HostResource& context, |
126 int32 put_offset); | 125 int32 put_offset); |
127 void OnMsgCreateTransferBuffer(const HostResource& context, | 126 void OnMsgCreateTransferBuffer(const HostResource& context, |
128 int32 size, | 127 int32 size, |
129 int32* id); | 128 int32* id); |
130 void OnMsgDestroyTransferBuffer(const HostResource& context, | 129 void OnMsgDestroyTransferBuffer(const HostResource& context, |
131 int32 id); | 130 int32 id); |
132 void OnMsgGetTransferBuffer(const HostResource& context, | 131 void OnMsgGetTransferBuffer(const HostResource& context, |
133 int32 id, | 132 int32 id, |
134 base::SharedMemoryHandle* transfer_buffer, | 133 base::SharedMemoryHandle* transfer_buffer, |
135 uint32* size); | 134 uint32* size); |
136 }; | 135 }; |
137 | 136 |
138 } // namespace proxy | 137 } // namespace proxy |
139 } // namespace ppapi | 138 } // namespace ppapi |
140 | 139 |
141 #endif // PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ | 140 #endif // PPAPI_PROXY_PPB_CONTEXT_3D_PROXY_H_ |
OLD | NEW |