| Index: ppapi/proxy/ppb_graphics_3d_proxy.cc
|
| diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc
|
| index 847e294680d2acaa5b4a5d07f0c53f0fc4ed7215..4436465d4f825386fed39b27de56fe9ca4d6df18 100644
|
| --- a/ppapi/proxy/ppb_graphics_3d_proxy.cc
|
| +++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc
|
| @@ -84,7 +84,9 @@ PP_Bool Graphics3D::Flush(int32_t put_offset) {
|
| return PP_FALSE;
|
| }
|
|
|
| -int32_t Graphics3D::CreateTransferBuffer(uint32_t size) {
|
| +int32_t Graphics3D::CreateTransferBuffer(uint32_t size,
|
| + int* shm_handle,
|
| + uint32_t* shm_size) {
|
| return PP_FALSE;
|
| }
|
|
|
| @@ -92,12 +94,6 @@ PP_Bool Graphics3D::DestroyTransferBuffer(int32_t id) {
|
| return PP_FALSE;
|
| }
|
|
|
| -PP_Bool Graphics3D::GetTransferBuffer(int32_t id,
|
| - int* shm_handle,
|
| - uint32_t* shm_size) {
|
| - return PP_FALSE;
|
| -}
|
| -
|
| gpu::CommandBuffer::State Graphics3D::WaitForTokenInRange(int32_t start,
|
| int32_t end) {
|
| return GetErrorState();
|
| @@ -203,8 +199,6 @@ bool PPB_Graphics3D_Proxy::OnMessageReceived(const IPC::Message& msg) {
|
| OnMsgCreateTransferBuffer)
|
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_DestroyTransferBuffer,
|
| OnMsgDestroyTransferBuffer)
|
| - IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_GetTransferBuffer,
|
| - OnMsgGetTransferBuffer)
|
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_SwapBuffers,
|
| OnMsgSwapBuffers)
|
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_InsertSyncPoint,
|
| @@ -301,12 +295,20 @@ void PPB_Graphics3D_Proxy::OnMsgAsyncFlush(const HostResource& context,
|
| void PPB_Graphics3D_Proxy::OnMsgCreateTransferBuffer(
|
| const HostResource& context,
|
| uint32 size,
|
| - int32* id) {
|
| + int32* id,
|
| + ppapi::proxy::SerializedHandle* transfer_buffer) {
|
| + transfer_buffer->set_null_shmem();
|
| EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
|
| - if (enter.succeeded())
|
| - *id = enter.object()->CreateTransferBuffer(size);
|
| - else
|
| + if (enter.succeeded()) {
|
| + int shm_handle = 0;
|
| + uint32_t shm_size = 0;
|
| + *id = enter.object()->CreateTransferBuffer(size, &shm_handle, &shm_size);
|
| + transfer_buffer->set_shmem(
|
| + TransportSHMHandleFromInt(dispatcher(), shm_handle),
|
| + shm_size);
|
| + } else {
|
| *id = -1;
|
| + }
|
| }
|
|
|
| void PPB_Graphics3D_Proxy::OnMsgDestroyTransferBuffer(
|
| @@ -317,23 +319,6 @@ void PPB_Graphics3D_Proxy::OnMsgDestroyTransferBuffer(
|
| enter.object()->DestroyTransferBuffer(id);
|
| }
|
|
|
| -void PPB_Graphics3D_Proxy::OnMsgGetTransferBuffer(
|
| - const HostResource& context,
|
| - int32 id,
|
| - ppapi::proxy::SerializedHandle* transfer_buffer) {
|
| - transfer_buffer->set_null_shmem();
|
| -
|
| - EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
|
| - int shm_handle = 0;
|
| - uint32_t shm_size = 0;
|
| - if (enter.succeeded() &&
|
| - enter.object()->GetTransferBuffer(id, &shm_handle, &shm_size)) {
|
| - transfer_buffer->set_shmem(
|
| - TransportSHMHandleFromInt(dispatcher(), shm_handle),
|
| - shm_size);
|
| - }
|
| -}
|
| -
|
| void PPB_Graphics3D_Proxy::OnMsgSwapBuffers(const HostResource& context) {
|
| EnterHostFromHostResourceForceCallback<PPB_Graphics3D_API> enter(
|
| context, callback_factory_,
|
|
|