Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc

Issue 8919014: Revert "Revert 113479 - Revert "Revert 113250 - Add CommandBuffer::SetGetBuffer"" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
« no previous file with comments | « ppapi/c/trusted/ppb_graphics_3d_trusted.h ('k') | ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698