summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_graphics_3d_impl.cc13
-rw-r--r--webkit/plugins/ppapi/ppb_graphics_3d_impl.h5
3 files changed, 11 insertions, 9 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
index d6ac041..9daaa74 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -457,7 +457,7 @@ bool GLInProcessContext::Initialize(bool onscreen,
}
command_buffer_.reset(new CommandBufferService);
- if (!command_buffer_->Initialize()) {
+ if (!command_buffer_->Initialize(kCommandBufferSize)) {
LOG(ERROR) << "Could not initialize command buffer.";
Destroy();
return false;
diff --git a/webkit/plugins/ppapi/ppb_graphics_3d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_3d_impl.cc
index 7e179a3..2794436 100644
--- a/webkit/plugins/ppapi/ppb_graphics_3d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_graphics_3d_impl.cc
@@ -87,13 +87,14 @@ PPB_Graphics3D_API* PPB_Graphics3D_Impl::AsPPB_Graphics3D_API() {
return this;
}
-PP_Bool PPB_Graphics3D_Impl::InitCommandBuffer() {
- return PP_FromBool(GetCommandBuffer()->Initialize());
+PP_Bool PPB_Graphics3D_Impl::InitCommandBuffer(int32_t size) {
+ return PP_FromBool(GetCommandBuffer()->Initialize(size));
}
-PP_Bool PPB_Graphics3D_Impl::SetGetBuffer(int32_t transfer_buffer_id) {
- GetCommandBuffer()->SetGetBuffer(transfer_buffer_id);
- return PP_TRUE;
+PP_Bool PPB_Graphics3D_Impl::GetRingBuffer(int* shm_handle,
+ uint32_t* shm_size) {
+ gpu::Buffer buffer = GetCommandBuffer()->GetRingBuffer();
+ return ShmToHandle(buffer.shared_memory, buffer.size, shm_handle, shm_size);
}
PP_Graphics3DTrustedState PPB_Graphics3D_Impl::GetState() {
@@ -190,7 +191,7 @@ bool PPB_Graphics3D_Impl::Init(PP_Resource share_context,
return false;
gpu::CommandBuffer* command_buffer = GetCommandBuffer();
- if (!command_buffer->Initialize())
+ if (!command_buffer->Initialize(kCommandBufferSize))
return false;
return CreateGLES2Impl(kCommandBufferSize, kTransferBufferSize);
diff --git a/webkit/plugins/ppapi/ppb_graphics_3d_impl.h b/webkit/plugins/ppapi/ppb_graphics_3d_impl.h
index 2a341b7..250911b 100644
--- a/webkit/plugins/ppapi/ppb_graphics_3d_impl.h
+++ b/webkit/plugins/ppapi/ppb_graphics_3d_impl.h
@@ -29,8 +29,9 @@ class PPB_Graphics3D_Impl : public ::ppapi::Resource,
virtual ::ppapi::thunk::PPB_Graphics3D_API* AsPPB_Graphics3D_API() OVERRIDE;
// PPB_Graphics3D_API trusted implementation.
- virtual PP_Bool InitCommandBuffer() OVERRIDE;
- virtual PP_Bool SetGetBuffer(int32_t transfer_buffer_id) OVERRIDE;
+ virtual PP_Bool InitCommandBuffer(int32_t size) OVERRIDE;
+ virtual PP_Bool GetRingBuffer(int* shm_handle,
+ uint32_t* shm_size) OVERRIDE;
virtual PP_Graphics3DTrustedState GetState() OVERRIDE;
virtual int32_t CreateTransferBuffer(uint32_t size) OVERRIDE;
virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE;