| 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 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" | 5 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 8 #include "gpu/command_buffer/common/command_buffer.h" | 8 #include "gpu/command_buffer/common/command_buffer.h" |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/proxy/enter_proxy.h" | 10 #include "ppapi/proxy/enter_proxy.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 host_resource(), dispatcher, capabilities, shared_state)); | 65 host_resource(), dispatcher, capabilities, shared_state)); |
| 66 | 66 |
| 67 return CreateGLES2Impl(kCommandBufferSize, kTransferBufferSize, | 67 return CreateGLES2Impl(kCommandBufferSize, kTransferBufferSize, |
| 68 share_gles2); | 68 share_gles2); |
| 69 } | 69 } |
| 70 | 70 |
| 71 PP_Bool Graphics3D::SetGetBuffer(int32_t /* transfer_buffer_id */) { | 71 PP_Bool Graphics3D::SetGetBuffer(int32_t /* transfer_buffer_id */) { |
| 72 return PP_FALSE; | 72 return PP_FALSE; |
| 73 } | 73 } |
| 74 | 74 |
| 75 PP_Bool Graphics3D::Flush(int32_t put_offset) { | 75 PP_Bool Graphics3D::Flush(int32_t put_offset, |
| 76 const std::vector<uint32>& sync_points) { |
| 76 return PP_FALSE; | 77 return PP_FALSE; |
| 77 } | 78 } |
| 78 | 79 |
| 79 scoped_refptr<gpu::Buffer> Graphics3D::CreateTransferBuffer( | 80 scoped_refptr<gpu::Buffer> Graphics3D::CreateTransferBuffer( |
| 80 uint32_t size, | 81 uint32_t size, |
| 81 int32_t* id) { | 82 int32_t* id) { |
| 82 *id = -1; | 83 *id = -1; |
| 83 return NULL; | 84 return NULL; |
| 84 } | 85 } |
| 85 | 86 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 bool* success) { | 285 bool* success) { |
| 285 EnterHostFromHostResource<PPB_Graphics3D_API> enter(context); | 286 EnterHostFromHostResource<PPB_Graphics3D_API> enter(context); |
| 286 if (enter.failed()) { | 287 if (enter.failed()) { |
| 287 *success = false; | 288 *success = false; |
| 288 return; | 289 return; |
| 289 } | 290 } |
| 290 *state = enter.object()->WaitForGetOffsetInRange(start, end); | 291 *state = enter.object()->WaitForGetOffsetInRange(start, end); |
| 291 *success = true; | 292 *success = true; |
| 292 } | 293 } |
| 293 | 294 |
| 294 void PPB_Graphics3D_Proxy::OnMsgAsyncFlush(const HostResource& context, | 295 void PPB_Graphics3D_Proxy::OnMsgAsyncFlush( |
| 295 int32 put_offset) { | 296 const HostResource& context, |
| 297 int32 put_offset, |
| 298 const std::vector<uint32>& sync_points) { |
| 296 EnterHostFromHostResource<PPB_Graphics3D_API> enter(context); | 299 EnterHostFromHostResource<PPB_Graphics3D_API> enter(context); |
| 297 if (enter.succeeded()) | 300 if (enter.succeeded()) |
| 298 enter.object()->Flush(put_offset); | 301 enter.object()->Flush(put_offset, sync_points); |
| 299 } | 302 } |
| 300 | 303 |
| 301 void PPB_Graphics3D_Proxy::OnMsgCreateTransferBuffer( | 304 void PPB_Graphics3D_Proxy::OnMsgCreateTransferBuffer( |
| 302 const HostResource& context, | 305 const HostResource& context, |
| 303 uint32 size, | 306 uint32 size, |
| 304 int32* id, | 307 int32* id, |
| 305 SerializedHandle* transfer_buffer) { | 308 SerializedHandle* transfer_buffer) { |
| 306 transfer_buffer->set_null_shmem(); | 309 transfer_buffer->set_null_shmem(); |
| 307 EnterHostFromHostResource<PPB_Graphics3D_API> enter(context); | 310 EnterHostFromHostResource<PPB_Graphics3D_API> enter(context); |
| 308 if (enter.succeeded()) { | 311 if (enter.succeeded()) { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 void PPB_Graphics3D_Proxy::SendSwapBuffersACKToPlugin( | 376 void PPB_Graphics3D_Proxy::SendSwapBuffersACKToPlugin( |
| 374 int32_t result, | 377 int32_t result, |
| 375 const HostResource& context) { | 378 const HostResource& context) { |
| 376 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK( | 379 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK( |
| 377 API_ID_PPB_GRAPHICS_3D, context, result)); | 380 API_ID_PPB_GRAPHICS_3D, context, result)); |
| 378 } | 381 } |
| 379 #endif // !defined(OS_NACL) | 382 #endif // !defined(OS_NACL) |
| 380 | 383 |
| 381 } // namespace proxy | 384 } // namespace proxy |
| 382 } // namespace ppapi | 385 } // namespace ppapi |
| OLD | NEW |