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 "base/numerics/safe_conversions.h" | 7 #include "base/numerics/safe_conversions.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "gpu/command_buffer/client/gles2_implementation.h" | 9 #include "gpu/command_buffer/client/gles2_implementation.h" |
10 #include "gpu/command_buffer/common/command_buffer.h" | 10 #include "gpu/command_buffer/common/command_buffer.h" |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 gpu::Capabilities* capabilities, | 265 gpu::Capabilities* capabilities, |
266 SerializedHandle* shared_state, | 266 SerializedHandle* shared_state, |
267 gpu::CommandBufferId* command_buffer_id) { | 267 gpu::CommandBufferId* command_buffer_id) { |
268 shared_state->set_null_shmem(); | 268 shared_state->set_null_shmem(); |
269 | 269 |
270 thunk::EnterResourceCreation enter(instance); | 270 thunk::EnterResourceCreation enter(instance); |
271 | 271 |
272 if (!enter.succeeded()) | 272 if (!enter.succeeded()) |
273 return; | 273 return; |
274 | 274 |
275 base::SharedMemoryHandle handle = base::SharedMemory::NULLHandle(); | 275 base::SharedMemoryHandle handle; |
276 result->SetHostResource( | 276 result->SetHostResource( |
277 instance, enter.functions()->CreateGraphics3DRaw( | 277 instance, enter.functions()->CreateGraphics3DRaw( |
278 instance, share_context.host_resource(), attrib_helper, | 278 instance, share_context.host_resource(), attrib_helper, |
279 capabilities, &handle, command_buffer_id)); | 279 capabilities, &handle, command_buffer_id)); |
280 if (!result->is_null()) { | 280 if (!result->is_null()) { |
281 shared_state->set_shmem(TransportSHMHandle(dispatcher(), handle), | 281 shared_state->set_shmem(TransportSHMHandle(dispatcher(), handle), |
282 sizeof(gpu::CommandBuffer::State)); | 282 sizeof(gpu::CommandBuffer::State)); |
283 } | 283 } |
284 } | 284 } |
285 | 285 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 void PPB_Graphics3D_Proxy::SendSwapBuffersACKToPlugin( | 393 void PPB_Graphics3D_Proxy::SendSwapBuffersACKToPlugin( |
394 int32_t result, | 394 int32_t result, |
395 const HostResource& context) { | 395 const HostResource& context) { |
396 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK( | 396 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK( |
397 API_ID_PPB_GRAPHICS_3D, context, result)); | 397 API_ID_PPB_GRAPHICS_3D, context, result)); |
398 } | 398 } |
399 #endif // !defined(OS_NACL) | 399 #endif // !defined(OS_NACL) |
400 | 400 |
401 } // namespace proxy | 401 } // namespace proxy |
402 } // namespace ppapi | 402 } // namespace ppapi |
OLD | NEW |