Index: ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc |
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc |
index 62ea1eb0b004bf00b9cc65a160310b2e6565d70d..f678be1ebe54c7dc655fc3933ae6dc7d463b3e26 100644 |
--- a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc |
+++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc |
@@ -244,40 +244,26 @@ void PpbGraphics3DRpcServer::PPB_Graphics3DTrusted_InitCommandBuffer( |
NaClSrpcRpc* rpc, |
NaClSrpcClosure* done, |
PP_Resource resource_id, |
- int32_t size, |
int32_t* success) { |
DebugPrintf("PPB_Graphics3DTrusted_InitCommandBuffer(...) resource_id: %d\n", |
resource_id); |
NaClSrpcClosureRunner runner(done); |
rpc->result = NACL_SRPC_RESULT_APP_ERROR; |
- if ((size > kMaxAllowedBufferSize) || (size < 0)) |
- return; |
*success = ppapi_proxy::PPBGraphics3DTrustedInterface()->InitCommandBuffer( |
- resource_id, size); |
+ resource_id); |
rpc->result = NACL_SRPC_RESULT_OK; |
} |
- |
-void PpbGraphics3DRpcServer::PPB_Graphics3DTrusted_GetRingBuffer( |
+void PpbGraphics3DRpcServer::PPB_Graphics3DTrusted_SetGetBuffer( |
NaClSrpcRpc* rpc, |
NaClSrpcClosure* done, |
PP_Resource resource_id, |
- NaClSrpcImcDescType* shm_desc, |
- int32_t* shm_size) { |
- DebugPrintf("PPB_Graphics3DTrusted_GetRingBuffer\n"); |
- nacl::DescWrapperFactory factory; |
- nacl::scoped_ptr<nacl::DescWrapper> desc_wrapper; |
+ int32_t transfer_buffer_id) { |
+ DebugPrintf("PPB_Graphics3DTrusted_SetGetBuffer\n"); |
NaClSrpcClosureRunner runner(done); |
rpc->result = NACL_SRPC_RESULT_APP_ERROR; |
- |
- int native_handle = 0; |
- uint32_t native_size = 0; |
- ppapi_proxy::PPBGraphics3DTrustedInterface()->GetRingBuffer( |
- resource_id, &native_handle, &native_size); |
- desc_wrapper.reset(factory.ImportShmHandle( |
- (NaClHandle)native_handle, native_size)); |
- *shm_desc = desc_wrapper->desc(); |
- *shm_size = native_size; |
+ ppapi_proxy::PPBGraphics3DTrustedInterface()->SetGetBuffer( |
+ resource_id, transfer_buffer_id); |
rpc->result = NACL_SRPC_RESULT_OK; |
} |