Index: ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.cc |
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.cc b/ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.cc |
index e151312373e55700afcffe6be3738ef33bbbbd0f..4a83a0477dae4d8b150fbcf659844f2692a1b3b9 100644 |
--- a/ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.cc |
+++ b/ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.cc |
@@ -25,38 +25,18 @@ CommandBufferNacl::~CommandBufferNacl() { |
iface_core_->ReleaseResource(graphics_3d_); |
} |
-bool CommandBufferNacl::Initialize(int32 size) { |
+bool CommandBufferNacl::Initialize() { |
DebugPrintf("CommandBufferNacl::Initialize\n"); |
int32_t success; |
NaClSrpcChannel* channel = ppapi_proxy::GetMainSrpcChannel(); |
NaClSrpcError retval = |
PpbGraphics3DRpcClient::PPB_Graphics3DTrusted_InitCommandBuffer( |
- channel, graphics_3d_, size, &success); |
+ channel, graphics_3d_, &success); |
DebugPrintf("CommandBufferNaCl::Initialize returned success=%s\n", |
(PP_TRUE == success) ? "TRUE" : "FALSE"); |
return NACL_SRPC_RESULT_OK == retval && PP_TRUE == success; |
} |
-gpu::Buffer CommandBufferNacl::GetRingBuffer() { |
- DebugPrintf("CommandBufferNacl::GetRingBuffer\n"); |
- if (!buffer_.ptr) { |
- DebugPrintf("CommandBufferNacl::GetRingBuffer: Fetching\n"); |
- int shm_handle = -1; |
- int32_t shm_size = 0; |
- |
- NaClSrpcChannel* channel = ppapi_proxy::GetMainSrpcChannel(); |
- NaClSrpcError retval = |
- PpbGraphics3DRpcClient::PPB_Graphics3DTrusted_GetRingBuffer( |
- channel, graphics_3d_, &shm_handle, &shm_size); |
- if (NACL_SRPC_RESULT_OK != retval) { |
- shm_handle = -1; |
- } |
- buffer_ = BufferFromShm(shm_handle, shm_size); |
- } |
- |
- return buffer_; |
-} |
- |
gpu::CommandBuffer::State CommandBufferNacl::GetState() { |
DebugPrintf("CommandBufferNacl::GetState\n"); |
PP_Graphics3DTrustedState state; |
@@ -110,6 +90,13 @@ gpu::CommandBuffer::State CommandBufferNacl::FlushSync(int32 put_offset, |
return last_state_; |
} |
+void CommandBufferNacl::SetGetBuffer(int32 transfer_buffer_id) { |
+ DebugPrintf("CommandBufferNacl::SetGetBuffer\n"); |
+ NaClSrpcChannel* channel = ppapi_proxy::GetMainSrpcChannel(); |
+ PpbGraphics3DRpcClient::PPB_Graphics3DTrusted_SetGetBuffer( |
+ channel, graphics_3d_, transfer_buffer_id); |
+} |
+ |
void CommandBufferNacl::SetGetOffset(int32 get_offset) { |
DebugPrintf("CommandBufferNacl::SetGetOffset\n"); |
// Not implemented by proxy. |